/* ============================================================
   外销版（White-label）界面 · 第三版
   设计方向：顶部横向导航 + 近黑主色 + 中性灰 + 单一数据绿
   刻意不用渐变、光晕、玻璃拟态、紫色——避免“AI 生成感”，
   走编辑部 / 专业工具（Linear、Stripe 那类）的克制路线。
   ============================================================ */

:root {
  --ink: #14161a;
  --muted: #6b6f76;
  --line: #e4e4e0;
  --line-strong: #cfcfc9;
  --surface: #fafaf8;
  --bg: #fafaf8;
  --accent: #14161a;
  --accent-deep: #000000;
  --data: #157347;          /* 仅用于金额/正向数据 */
  --danger: #b42318;
  --warn: #a15c07;
  --radius: 8px;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --hairline: #ecece8;
  --shadow: none;
  --wl-bg: #fafaf8;
  --wl-sand: #f4f4f0;
  --lime: #e8f2ec;
  --lime-deep: #157347;
  color-scheme: light;
}

body {
  background: var(--wl-bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-feature-settings: "tnum" 1;
}
::selection { background: #dfe6e2; color: #14161a; }

/* ---------- 顶部导航（桌面端） ---------- */
@media (min-width: 701px) {
  .sidebar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 60px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0 max(26px, calc((100vw - 1240px) / 2 + 32px));
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    z-index: 70;
  }
  .sidebar::before,
  .sidebar::after { display: none; }

  .brand {
    margin: 0 26px 0 0;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--ink);
    flex: 0 0 auto;
  }
  .brand-logo-img {
    width: 104px;
    height: auto;
    filter: none;
    opacity: 1;
    mix-blend-mode: multiply;
  }
  .brand span { display: none; }

  nav {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
  }
  nav button {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 520;
    white-space: nowrap;
    position: relative;
    box-shadow: none;
    transition: color .12s ease;
  }
  nav button:hover { background: transparent; color: var(--ink); }
  nav button.active {
    color: var(--ink);
    font-weight: 620;
    background: transparent;
    box-shadow: none;
  }
  nav button.active:hover { background: transparent; color: var(--ink); }
  nav button.active::before { display: none; }
  nav button.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: var(--ink);
  }
  .nav-icon { width: 16px; height: 16px; flex: 0 0 16px; opacity: .72; }
  .nav-icon svg { width: 16px; height: 16px; }
  nav button.active .nav-icon { opacity: 1; }

  .sidebar-foot {
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
  }
  .sidebar-foot .sidebar-user {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 600;
    max-width: 150px;
  }
  .sidebar-user::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--data);
  }
  .sidebar-logout {
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: 12.5px;
  }
  .sidebar-logout:hover { color: var(--danger); background: transparent; text-decoration: none; }
  .sidebar-foot .text-button { color: var(--muted); font-size: 12.5px; }
  .sidebar-foot .text-button:hover { color: var(--ink); background: transparent; }

  .workspace { margin-left: 0; }
  main { max-width: 1240px; padding: 36px 32px 64px; }
}

/* ---------- 标题 ---------- */
@media (min-width: 701px) {
  .page-heading { margin-bottom: 26px; align-items: flex-end; }
}
.page-heading h1 {
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -.015em;
  color: var(--ink);
  gap: 0;
}
.page-heading h1::before { display: none; }

/* ---------- 按钮 / 输入 ---------- */
.button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 550;
  box-shadow: none;
  backdrop-filter: none;
  transition: background .12s ease, border-color .12s ease;
}
.button:hover:not(:disabled) {
  background: var(--wl-sand);
  border-color: #b9b9b1;
  transform: none;
  box-shadow: none;
}
.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: none;
}
.button.primary:hover:not(:disabled) { background: #000; border-color: #000; }

.text-button { color: var(--ink); font-weight: 550; font-size: 12.5px; }
.text-button:hover { background: transparent; color: #000; text-decoration: underline; text-underline-offset: 3px; }
.text-button.danger { color: var(--danger); }
.text-button.danger:hover { color: #8f1d13; }

input:not([type=checkbox]), select {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  box-shadow: none;
}
input:not([type=checkbox]):focus, select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  background: #fff;
}
.app-picker-input { border-radius: 6px; }
input::placeholder { color: #9a9d9f; }

/* ---------- 数据卡 ---------- */
.totals-strip { gap: 0; margin-bottom: 26px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.totals-strip > div {
  position: relative;
  padding: 20px 22px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: visible;
}
.totals-strip > div:first-child { border-left: 0; padding-left: 22px; }
.totals-strip > div::after { display: none; }
.totals-strip > div > span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.totals-strip strong {
  margin-top: 8px;
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.totals-strip strong small { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.totals-strip p { margin-top: 4px; color: var(--muted); font-size: 12px; }

.totals-strip .total-main {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}
.totals-strip .total-main > span { color: rgba(255, 255, 255, .66); }
.totals-strip .total-main strong { color: #fff; font-size: 34px; }
.totals-strip .total-main strong small { color: rgba(255, 255, 255, .62); }
.totals-strip .total-main p { color: rgba(255, 255, 255, .58); }
.totals-strip .total-main em { color: #9fe3c0; }

/* ---------- 游戏卡片 ---------- */
.games-grid { gap: 12px; }
.game-card {
  min-height: 200px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
  transition: border-color .12s ease;
}
.game-card:hover {
  border-color: var(--line-strong);
  transform: none;
  box-shadow: none;
}
.game-card-title {
  padding: 14px 16px 12px;
  background: #fff;
  border-bottom: 1px solid var(--hairline);
  gap: 10px;
}
.game-card-title h3 { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.game-mark {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
  font-size: 11px;
}
.connection-text { color: var(--muted); font-size: 11.5px; }
.game-card-money { padding: 12px 16px 14px; }
.game-card-money > span { color: var(--muted); font-size: 11.5px; }
.game-income {
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.game-income small { color: var(--muted); font-size: 11.5px; }
.game-card-bottom {
  padding: 9px 16px;
  border-top: 1px solid var(--hairline);
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
}
.detail-link { color: var(--ink); font-size: 12px; font-weight: 600; }
.detail-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 表格 ---------- */
.table-container {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  overflow: auto;
}
th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f6f6f3;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafaf7; }
.table-footer { color: var(--muted); font-size: 12px; }
.record-notice { border-radius: 6px; background: #fdf8ec; color: #7a5a12; }

.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: var(--muted);
}
.empty-state h3 { color: var(--ink); font-size: 15px; }

/* ---------- 弹窗 / 抽屉 ---------- */
.overlay { background: rgba(20, 22, 26, .34); backdrop-filter: none; }
.dialog {
  width: 500px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 60px -28px rgba(20, 22, 26, .45);
  backdrop-filter: none;
  padding: 26px 28px;
}
.dialog-heading h2 { font-size: 17px; font-weight: 640; letter-spacing: -.01em; }
.dialog-actions { border-top: 1px solid var(--hairline); padding-top: 14px; }
.form-field { color: var(--muted); font-size: 12px; font-weight: 550; }
.form-field > input, .form-field > select { border-radius: 6px; }
.close-button { border-radius: 6px; color: var(--muted); }
.close-button:hover { background: var(--wl-sand); color: var(--ink); }

.income-drawer {
  border-radius: 0;
  background: #fff;
  box-shadow: -24px 0 60px -30px rgba(20, 22, 26, .35);
}
.drawer-header { background: #fff; border-bottom: 1px solid var(--line); backdrop-filter: none; }
.drawer-game h2 { font-size: 18px; letter-spacing: -.01em; }
.drawer-body .totals-strip { border-radius: 8px; }
.drawer-body .totals-strip > div { border-left: 1px solid var(--line); }

/* ---------- 登录页 ---------- */
.login-screen {
  background: var(--wl-bg);
  background-image:
    linear-gradient(rgba(20, 22, 26, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 22, 26, .028) 1px, transparent 1px);
  background-size: 28px 28px;
}
.login-card {
  width: 360px;
  padding: 32px 30px 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 50px -30px rgba(20, 22, 26, .35);
  backdrop-filter: none;
}
.login-brand span { color: var(--muted); letter-spacing: .12em; font-size: 11px; }
.login-logo { width: 96px; }
.login-button {
  min-height: 42px;
  border-radius: 6px;
  background: var(--ink);
  box-shadow: none;
  font-weight: 600;
}
.login-button:hover:not(:disabled) { background: #000; }

/* ---------- 其它 ---------- */
.record-tabs button { color: var(--muted); border-radius: 0; }
.record-tabs button.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 620; }
.inline-success { border-radius: 6px; background: #f1f8f3; color: #1d6b43; }
.inline-error { border-radius: 6px; background: #fdf2f1; }
.app-picker-list { border-radius: 8px; box-shadow: 0 12px 28px -18px rgba(20, 22, 26, .4); }
.app-toast { background: var(--ink); border-radius: 6px; box-shadow: none; font-size: 12.5px; }

.date-shortcuts { border: 0; }
.date-shortcuts button { border-radius: 6px; color: var(--muted); font-size: 12.5px; }
.date-shortcuts button:hover { background: var(--wl-sand); color: var(--ink); }
.date-shortcuts button.selected {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}
.date-shortcuts button.selected:hover { background: var(--ink); color: #fff; }

.section-meta { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
*::-webkit-scrollbar-thumb { background: #d5d5cf; }
*::-webkit-scrollbar-thumb:hover { background: #bcbcb5; }

/* ---------- 移动端 ---------- */
@media (max-width: 700px) {
  body { background: var(--wl-bg); }
  .mobile-header { background: #fff; border-bottom: 1px solid var(--line); backdrop-filter: none; }
  main { padding: 18px 14px 96px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 16px; }
  .page-heading h1 { font-size: 19px; }
  .page-actions { width: 100%; }
  .totals-strip { border-radius: 8px; }
  .totals-strip > div { border-left: 0; border-top: 1px solid var(--line); padding: 16px 18px; }
  .totals-strip > div:first-child { border-top: 0; }
  .totals-strip .total-main strong { font-size: 28px; }
  .totals-strip strong { font-size: 24px; }
  .game-card { border-radius: 8px; }
  .dialog { border-radius: 10px; }
  .tabbar {
    background: #fff;
    border-top: 1px solid var(--line);
    backdrop-filter: none;
    box-shadow: none;
  }
  .tabbar button { color: var(--muted); border-radius: 0; }
  .tabbar button.active {
    color: var(--ink);
    background: transparent;
    font-weight: 620;
    position: relative;
  }
  .tabbar button.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 2px;
    background: var(--ink);
  }
}

/* ---------- 金额标签中性化（去掉残留的蓝紫底色） ---------- */
.record-value { border-radius: 6px; }
.amount-tier-green { --amount-bg: #eef5f0; --amount-ink: #1d6b43; }
.amount-tier-blue { --amount-bg: #f2f2ef; --amount-ink: #26282c; }
.amount-tier-white { --amount-bg: #f5f5f2; --amount-ink: #26282c; }
.amount-tier-purple, .amount-tier-yellow { --amount-bg: #f5f5f2; --amount-ink: #26282c; }
/* ---------- 子账户权限（应用管理开关） ---------- */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.form-check input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--ink);
  cursor: pointer;
}
.perm-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}
.perm-manage { background: #eef5f0; color: #1d6b43; }
.perm-readonly { background: #f4f4f1; color: #6b6f76; box-shadow: inset 0 0 0 1px var(--line); }
.accounts-table td, .accounts-table th { white-space: nowrap; }
/* 权限徽章可点击切换 */
button.perm-badge {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow .12s ease, transform .12s ease;
}
button.perm-badge:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1px currentColor;
}
button.perm-badge:disabled { cursor: default; opacity: 1; }
/* ---------- 概览排序 ---------- */
.overview-sort {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.overview-sort select {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 12.5px;
  border-radius: 6px;
  background: #fff;
}
.overview-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .overview-tools { width: 100%; }
  .overview-sort { flex: 1 1 auto; }
  .overview-sort select { flex: 1; }
}
/* ---------- 未授权提示页 ---------- */
.license-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-image:
    linear-gradient(rgba(20, 22, 26, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 22, 26, .028) 1px, transparent 1px);
  background-size: 28px 28px;
}
.license-card {
  width: min(440px, 100%);
  padding: 34px 32px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px -34px rgba(20, 22, 26, .45);
  text-align: center;
}
.license-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fbeceb;
  color: #b42318;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .06em;
}
.license-card h1 { margin: 14px 0 8px; font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.license-reason { color: #b42318; font-size: 13px; margin: 0 0 18px; }
.license-meta { display: grid; gap: 8px; margin: 0 0 18px; text-align: left; }
.license-meta > div { display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; }
.license-meta dt { color: var(--muted); margin: 0; }
.license-meta dd { margin: 0; color: var(--ink); font-weight: 550; }
.license-meta .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; text-align: right; }
.license-hint { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.7; }
/* ============================================================
   2026-11-01 移动端 / 界面修复
   ============================================================ */

@media (max-width: 700px) {
  /* 1) 标题与操作按钮同一行，不再上下堆叠 */
  .page-heading { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 14px; }
  .page-actions { width: auto; margin-left: auto; }
  .page-actions .button { min-height: 36px; padding: 7px 12px; }

  /* 2) 概览工具栏：排序 + 显示名称一行，搜索另一行 */
  .overview-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; align-items: center; }
  .overview-sort { grid-column: 1; min-width: 0; }
  .overview-sort select { width: 100%; flex: 1 1 auto; min-width: 0; }
  .overview-tools .overview-name-toggle { grid-column: 2; white-space: nowrap; }
  .overview-tools .search-input { grid-column: 1 / -1; width: 100%; min-width: 0; }

  /* 3) 财务筛选：单列，快捷日期一行 5 个 */
  .finance-toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; padding-bottom: 12px; }
  .finance-toolbar > * { grid-column: 1 / -1; }
  .date-inputs { display: flex; align-items: center; gap: 8px; }
  .date-inputs input { flex: 1 1 0; min-width: 0; width: auto; }
  .date-shortcuts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .date-shortcuts button { padding: 8px 4px; font-size: 12px; }
  .min-amount-row { display: flex; gap: 10px; align-items: flex-end; }
  .min-amount-row .min-amount-field { flex: 1 1 auto; }
  .min-amount-row .finance-name-toggle { flex: 0 0 auto; min-height: 42px; }
  .app-picker-input { width: 100%; }

  /* 4) 底部导航：去掉残留高亮块和压住图标的横线 */
  .tabbar button,
  .tabbar button.active {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .tabbar button.active::before { content: none !important; display: none !important; }
  .tabbar button.active { color: var(--ink); font-weight: 650; }
  .tabbar button.active svg { color: var(--ink); }

  /* 5) 列表页顶栏换行 */
  .section-toolbar { flex-wrap: wrap; gap: 10px; }
  .source-tools { flex-wrap: wrap; width: 100%; }
  .source-tools .search-input { flex: 1 1 100%; width: 100%; }
  .source-tools .button { flex: 1 1 auto; }

  /* 6) 子账户卡片补字段标签 */
  .accounts-table td:nth-child(2)::before { content: "角色"; }
  .accounts-table td:nth-child(3)::before { content: "已绑定"; }
  .accounts-table td:nth-child(4)::before { content: "额度"; }
  .accounts-table td:nth-child(5)::before { content: "权限"; }
  .accounts-table td:nth-child(2),
  .accounts-table td:nth-child(3),
  .accounts-table td:nth-child(4) { display: flex; gap: 10px; align-items: center; }
  .accounts-table td::before { color: var(--muted); font-size: 12px; min-width: 56px; }

  /* 7) 弹窗 / 抽屉铺满 */
  .dialog { width: calc(100vw - 24px); max-height: 88vh; }
  .dialog-body { padding-left: 18px; padding-right: 18px; }
  .income-drawer { width: 100%; border-radius: 0; }
  .overlay { padding: 12px; }

  /* 8) 横向滚动更顺手 */
  .table-container { -webkit-overflow-scrolling: touch; }
}

/* ---------- 小程序实时收益 ---------- */
.mp-totals .total-main strong { font-variant-numeric: tabular-nums; }
.mp-chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.mp-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mp-chart-head h3 { font-size: 14px; font-weight: 600; }
.mp-chart {
  width: 100%;
  height: 120px;
  display: block;
  background: linear-gradient(180deg, #fafaf6, #fff);
  border-radius: 8px;
}
.mp-chart-area { fill: rgba(20, 22, 26, .06); stroke: none; }
.mp-chart-line { fill: none; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.mp-chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.mp-grid .panel { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.panel-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.mp-grid .table-container { border: 1px solid var(--line); border-radius: 10px; }
.mp-webhook-url { white-space: pre-wrap; word-break: break-all; margin: 10px 0; }
@media (max-width: 700px) {
  .mp-grid { grid-template-columns: 1fr; }
  .mp-chart { height: 90px; }
}
/* ---------- 小程序：自然日 + 补查 ---------- */
.mp-sync-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -10px 0 12px; }
.mp-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.mp-day {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.mp-day > span { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.mp-day > span small { font-weight: 400; letter-spacing: 0; }
.mp-day strong { display: block; margin-top: 6px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mp-day strong small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.mp-day p { margin-top: 4px; color: var(--muted); font-size: 11.5px; }
@media (max-width: 700px) {
  .mp-days { grid-template-columns: 1fr; gap: 8px; }
  .mp-day { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
  .mp-day > span { flex-direction: column; align-items: flex-start; gap: 0; }
  .mp-day strong { margin-top: 0; font-size: 20px; }
  .mp-day p { display: none; }
}
/* ---------- 小程序配置管理 ---------- */
.mp-config { margin-bottom: 18px; }
.mp-config-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.mp-config-head .muted { margin: 4px 0 0; font-size: 12px; }
.mp-config-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.mp-app-message { max-width: 360px; text-align: right; }
.mp-config .table-container { border: 1px solid var(--line); border-radius: 10px; }
.mp-config .status-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.mp-config .status-badge.positive { background: rgba(30, 120, 70, .1); color: #1c6b43; }
.mp-config .status-badge.neutral { background: rgba(20, 22, 26, .06); color: var(--muted); }
.row-actions { display: flex; gap: 10px; }
.link-button { background: none; border: 0; padding: 0; color: var(--ink); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(20,22,26,.25); }
.link-button:hover { text-decoration-color: var(--ink); }
.link-button.danger { color: #a33a2c; }
.mp-app-dialog { width: min(460px, calc(100vw - 32px)); }
@media (max-width: 700px) {
  .mp-config .row-actions { display: flex; gap: 14px; justify-content: flex-start; padding-top: 4px; }
  .mp-config-head { flex-direction: column; }
  .mp-config-actions { width: 100%; justify-content: space-between; }
  .mp-app-message { text-align: left; }
  .row-actions { flex-wrap: wrap; gap: 8px; }
}
.mp-chart-empty { margin: 10px 0 0; font-size: 12px; line-height: 1.6; }
.mp-hook-status { color: var(--ink); }
.mp-sort {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
@media (max-width: 700px) {
  .mp-sort { flex: 1 1 46%; min-width: 0; }
}
