/* =========================================================================
   Apple-Design 共享层 · v1
   =========================================================================
   使用方法：
     <link rel="stylesheet" href="/static/apple-design.css?v=1">
     <script src="/static/apple-motion.js?v=1" defer></script>

   包含：
     1. 品牌色 token 兜底（backend SSR 已注入 --brand-primary · 这里只提供 fallback）
     2. 材质层（glass-thin / glass-regular / glass-thick / scrim）
     3. 排版尺度（display / title / body / caption · 各自 tracking/leading）
     4. Pointer-down 反馈（.pressable / .pressable-strong）
     5. 焦点环（Apple 蓝晕圈）
     6. Rubber-band 滚动（.scroll-natural）
     7. 无障碍：reduced-motion / reduced-transparency / high-contrast

   设计原则：
     · 所有交互元件 :active 100ms 即时反馈（永不等 click）
     · 材质区分：小控件用 thin · 卡片用 regular · 大面板用 thick
     · 大字负 tracking · 小字微正 tracking
     · 减弱动效时用 cross-fade 替代 transform
   ========================================================================= */

/* ── 品牌色 fallback（SSR 未注入时用） ───────────────────────────────── */
:root {
  --brand-primary: #0066ff;
  --brand-primary-deep: #0052cc;
  --brand-primary-rgb: 0, 102, 255;
  --brand-primary-soft: rgba(var(--brand-primary-rgb), 0.12);
  --brand-primary-glow: rgba(var(--brand-primary-rgb), 0.35);
}
body[data-brand="Y7"] {
  --brand-primary: #2BA888;
  --brand-primary-deep: #1F8069;
  --brand-primary-rgb: 43, 168, 136;
}
body[data-brand="admin"], body[data-brand="ADMIN"] {
  --brand-primary: #1d1d1f;
  --brand-primary-deep: #000;
  --brand-primary-rgb: 29, 29, 31;
}

/* ── 材质层（glass tiers） ────────────────────────────────────────────
   命名参考 Apple HIG：
     .material-thin      · 轻材质 · 小控件 · toast · pill
     .material-regular   · 常规材质 · 卡片 · popover
     .material-thick     · 厚材质 · 大面板 · sheet · modal
     .scrim              · 遮罩 · 用于 modal 背后压下背景
   ================================================================== */
.material-thin,
.material-regular,
.material-thick {
  border-radius: 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.material-thin {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.material-regular {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: saturate(190%) blur(30px);
  -webkit-backdrop-filter: saturate(190%) blur(30px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 8px 24px rgba(15, 23, 42, 0.06);
}
.material-thick {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 24px 64px rgba(15, 23, 42, 0.12);
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] .material-thin { background: rgba(28, 28, 30, 0.55); border-color: rgba(255,255,255,0.08); }
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] .material-regular { background: rgba(28, 28, 30, 0.65); border-color: rgba(255,255,255,0.10); }
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] .material-thick { background: rgba(28, 28, 30, 0.78); border-color: rgba(255,255,255,0.12); }

.scrim {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 998;
}
.scrim.on { opacity: 1; pointer-events: auto; }

/* ── 排版尺度 ─────────────────────────────────────────────────────────
   Apple 原则：大字负 tracking · 小字正 tracking · leading 与 size 反比
   ================================================================== */
.type-display {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 700;
  font-optical-sizing: auto;
}
.type-title-1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.type-title-2 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.type-title-3 {
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  font-weight: 600;
}
.type-body {
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  font-weight: 400;
}
.type-caption {
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.005em;
  font-weight: 500;
  color: var(--muted, #86868b);
}
.type-mono {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}

/* ── Pointer-down 即时反馈（.pressable） ─────────────────────────────
   Apple 原则：feedback 必须在 pointer-down · 不等 click
   scale + 亮度轻微变化 · 100ms 内完成 · 释放回弹自然
   ================================================================== */
.pressable {
  transition: transform 90ms cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 90ms ease-out,
              background-color 120ms ease-out;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  user-select: none;
  will-change: transform;
}
.pressable:active { transform: scale(0.97); filter: brightness(0.96); }
.pressable-strong { transition: transform 100ms cubic-bezier(0.34, 1.56, 0.64, 1); cursor: pointer; }
.pressable-strong:active { transform: scale(0.94); }

/* button 元素自动适用 · 除非 no-press */
button:not(.no-press), .btn:not(.no-press), [role="button"]:not(.no-press) {
  transition: transform 90ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 120ms ease-out, filter 90ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
button:not(.no-press):active,
.btn:not(.no-press):active,
[role="button"]:not(.no-press):active {
  transform: scale(0.97);
  filter: brightness(0.96);
}

/* ── 焦点环（Apple 蓝晕圈） ──────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--brand-primary-glow, rgba(0, 102, 255, 0.35));
  outline-offset: 2px;
  border-radius: inherit;
}

/* ── Rubber-band 滚动感 · iOS overscroll ─────────────────────────── */
.scroll-natural {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}
.scroll-natural::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-natural::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.18); border-radius: 3px; }
.scroll-natural::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.28); }
.scroll-natural::-webkit-scrollbar-track { background: transparent; }

/* ── Scroll-edge fade（stickyheader + 滑到边有渐变 mask） ───────── */
.stick-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(190%) blur(24px);
  -webkit-backdrop-filter: saturate(190%) blur(24px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}
.stick-top::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -20px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
  pointer-events: none;
}

/* ── Sheet / Modal 进出动效（材质化 · 非纯 fade） ─────────────── */
.sheet-enter {
  animation: sheet-in 340ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom center;
}
.sheet-exit {
  animation: sheet-out 220ms cubic-bezier(0.4, 0, 1, 1);
  transform-origin: bottom center;
}
@keyframes sheet-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.98); backdrop-filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); backdrop-filter: blur(40px) saturate(200%); }
}
@keyframes sheet-out {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(12px) scale(0.98); }
}

/* Popover · 来自 trigger 位 · transform-origin 由 JS 设置 */
.popover-enter {
  animation: pop-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.popover-exit {
  animation: pop-out 160ms cubic-bezier(0.4, 0, 1, 1);
}
@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.92) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pop-out {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.96) translateY(-2px); }
}

/* Tab 切换 · 内容 cross-fade + 微 slide */
.tab-swap-enter {
  animation: tab-swap 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tab-swap {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── 数字滚动过渡（金额变化平滑） ───────────────────────────────
   用法：<span class="num-tick" data-old="123" data-new="456"></span>
   apple-motion.js 会 tween 数字
   ================================================================ */
.num-tick { display: inline-block; font-variant-numeric: tabular-nums; }

/* ── 徽章 / Pill / Chip · Apple 系统按钮风 ─────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 980px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(var(--brand-primary-rgb), 0.12);
  color: var(--brand-primary);
  border: 0.5px solid rgba(var(--brand-primary-rgb), 0.18);
}
.chip-good { background: rgba(48, 209, 88, 0.14); color: #248a3d; border-color: rgba(48, 209, 88, 0.22); }
.chip-warn { background: rgba(255, 159, 10, 0.14); color: #b26a05; border-color: rgba(255, 159, 10, 0.22); }
.chip-bad  { background: rgba(255, 69, 58, 0.14); color: #c00; border-color: rgba(255, 69, 58, 0.22); }
.chip-neutral { background: rgba(120, 120, 128, 0.10); color: #6e6e73; border-color: rgba(120, 120, 128, 0.16); }

/* ── 分隔线 · Apple hairline ──────────────────────────────────── */
.hairline { height: 0.5px; background: rgba(0, 0, 0, 0.08); }
.hairline-strong { height: 0.5px; background: rgba(0, 0, 0, 0.14); }

/* ── 无障碍 · Reduced Motion ───────────────────────────────────
   Apple: 不是"无动效" · 而是"用 cross-fade 替代运动"
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 200ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
    scroll-behavior: auto !important;
  }
  .pressable:active,
  button:not(.no-press):active,
  .btn:not(.no-press):active {
    transform: none !important;
  }
  .sheet-enter, .sheet-exit,
  .popover-enter, .popover-exit,
  .tab-swap-enter {
    animation: none !important;
    transition: opacity 180ms ease !important;
  }
}

/* ── 无障碍 · Reduced Transparency ─────────────────────────────
   高频访问代理 / 老人机 / 视觉障碍 · 磨砂改为实色
   ================================================================ */
@media (prefers-reduced-transparency: reduce) {
  .material-thin,
  .material-regular,
  .material-thick,
  .stick-top {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] .material-thin,
  /* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] .material-regular,
  /* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] .material-thick,
  /* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] .stick-top {
    background: rgba(28, 28, 30, 0.98) !important;
  }
  .scrim {
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: none !important;
  }
}

/* ── 无障碍 · High Contrast ────────────────────────────────────── */
@media (prefers-contrast: more) {
  :root {
    --border: rgba(0, 0, 0, 0.35);
    --border-soft: rgba(0, 0, 0, 0.25);
  }
  .material-thin,
  .material-regular,
  .material-thick {
    border-width: 1px !important;
    border-color: rgba(0, 0, 0, 0.35) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: none !important;
  }
  .chip { border-width: 1px !important; }
  :focus-visible { outline-width: 4px !important; outline-color: #005ce6 !important; }
}

/* =========================================================================
   v2 · 组件层（Button/Card/Input/Table/Modal/Drawer/Tabs/Segmented/Sidebar）
   ========================================================================= */

/* ── iOS 系统语义色兜底 · 兼容旧命名 ─────────────────────────────────── */
:root {
  --ios-green: #30d158;
  --ios-green-soft: rgba(48, 209, 88, 0.14);
  --ios-red: #ff453a;
  --ios-red-soft: rgba(255, 69, 58, 0.14);
  --ios-orange: #ff9f0a;
  --ios-orange-soft: rgba(255, 159, 10, 0.14);
  --sep: rgba(60, 60, 67, 0.10);
  --sep-strong: rgba(60, 60, 67, 0.18);
  --text-1: #000;
  --text-2: rgba(60, 60, 67, 0.72);
  --text-3: rgba(60, 60, 67, 0.50);
  --text-4: rgba(60, 60, 67, 0.30);
  --r-sm: 8px;
  --r: 10px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 22px;
  --r-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --dur-fast: 100ms;
  --dur: 200ms;
  --dur-med: 300ms;
  --dur-slow: 400ms;
}

/* ══════════════════════════════════════════════════════════════
   Body 背景 · 品牌渐变
   ══════════════════════════════════════════════════════════════ */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
               "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text-1);
  letter-spacing: -0.01em;
  line-height: 1.5;
  min-height: 100vh;
}
body:not([data-no-bg]) {
  background:
    radial-gradient(ellipse 60% 50% at 10% 0%, rgba(var(--brand-primary-rgb, 0, 102, 255), 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 95% 5%, rgba(191, 90, 242, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 80% 100%, rgba(100, 210, 255, 0.24) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 100%, rgba(255, 149, 0, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 50% 40%, rgba(88, 86, 214, 0.10) 0%, transparent 55%),
    #f5f7fb;
  background-attachment: fixed;
  background-size: 100% 100%;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-bg]) {
  /* Apple macOS Sonoma 深色 · 极淡渐变 · 不再喧宾夺主 */
  background:
    radial-gradient(ellipse 60% 50% at 10% 0%, rgba(var(--brand-primary-rgb, 0, 102, 255), 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 95% 5%, rgba(88, 86, 214, 0.08) 0%, transparent 55%),
    #0d0d12;
}

/* ══════════════════════════════════════════════════════════════
   Button · pointer-down 反馈 · 4 变体
   ══════════════════════════════════════════════════════════════ */
.ad-btn, .btn.ad {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 0 16px; height: 36px; min-width: 64px;
  font: 500 14px/1 inherit;
  letter-spacing: -0.1px;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--r-md);
  cursor: pointer; user-select: none;
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.ad-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.88); border-color: rgba(var(--brand-primary-rgb), 0.35); }
.ad-btn:not(:disabled):active { transform: scale(0.97); filter: brightness(0.96); }
.ad-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ad-btn.primary {
  background: var(--brand-primary); color: #fff; border: none; font-weight: 600;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.ad-btn.primary:hover:not(:disabled) {
  background: var(--brand-primary-deep);
  box-shadow: 0 6px 16px rgba(var(--brand-primary-rgb), 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
.ad-btn.danger { background: var(--ios-red); color: #fff; border: none; box-shadow: 0 4px 12px rgba(255, 69, 58, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24); }
.ad-btn.danger:hover:not(:disabled) { background: #ff5e54; }
.ad-btn.text { background: transparent; border: none; color: var(--brand-primary); padding: 0 8px; min-width: 0; }
.ad-btn.text:hover:not(:disabled) { background: rgba(var(--brand-primary-rgb), 0.10); }
.ad-btn.sm { height: 28px; padding: 0 12px; font-size: 13px; min-width: 48px; }
.ad-btn.lg { height: 42px; padding: 0 20px; font-size: 15px; min-width: 80px; border-radius: var(--r-lg); }
.ad-btn.icon { width: 34px; min-width: 34px; padding: 0; border-radius: var(--r-pill); }

/* ══════════════════════════════════════════════════════════════
   Card · 液态玻璃 · 大圆角
   ══════════════════════════════════════════════════════════════ */
.ad-card {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-2xl);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 20px;
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.ad-card.sm { padding: 14px; border-radius: var(--r-lg); }
.ad-card.lg { padding: 28px; }
.ad-card.clickable { cursor: pointer; }
.ad-card.clickable:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.05); }
.ad-card.clickable:active { transform: scale(0.98); }
.ad-card-hd { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; margin: 0 0 12px; color: var(--text-1); }
.ad-card-sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }

/* ══════════════════════════════════════════════════════════════
   Input · Select · Textarea · glass + focus ring
   ══════════════════════════════════════════════════════════════ */
.ad-input, .ad-select, .ad-textarea {
  width: 100%; min-height: 32px; padding: 6px 12px;
  font: 14px/1.4 inherit; color: var(--text-1);
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--r-md);
  outline: none;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.ad-input:hover:not(:disabled), .ad-select:hover:not(:disabled), .ad-textarea:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(var(--brand-primary-rgb), 0.35);
}
.ad-input:focus, .ad-select:focus, .ad-textarea:focus {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.12);
}
.ad-textarea { min-height: 72px; resize: vertical; }

/* ══════════════════════════════════════════════════════════════
   Badge / Tag / Pill (兼容 .badge 命名)
   ══════════════════════════════════════════════════════════════ */
.ad-tag {
  display: inline-flex; align-items: center;
  padding: 2px 10px; font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.008em; line-height: 16px;
  border-radius: var(--r-pill);
  background: rgba(var(--brand-primary-rgb), 0.12); color: var(--brand-primary);
  border: none; white-space: nowrap;
}
.ad-tag.pos { background: var(--ios-green-soft); color: #1b7d38; }
.ad-tag.neg { background: var(--ios-red-soft); color: #b91b13; }
.ad-tag.warn { background: var(--ios-orange-soft); color: #a45c00; }
.ad-tag.muted { background: rgba(120, 120, 128, 0.14); color: var(--text-2); }

/* ══════════════════════════════════════════════════════════════
   Table · Apple News 风格 · glass header
   ══════════════════════════════════════════════════════════════ */
.ad-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: transparent; border-radius: var(--r-md); overflow: hidden;
}
.ad-table thead th {
  padding: 10px 14px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; color: var(--text-2);
  background: #ffffff;
  border-bottom: 0.5px solid var(--sep);
  white-space: nowrap; text-align: left;
  position: relative;
}
.ad-table tbody td {
  padding: 10px 14px; font-size: 13.5px; color: var(--text-1);
  border-bottom: 0.5px solid var(--sep);
  vertical-align: middle;
  transition: background var(--dur-fast) var(--ease-out);
}
.ad-table tbody tr:hover td { background: rgba(var(--brand-primary-rgb), 0.06); }
.ad-table tbody tr:active td { background: rgba(var(--brand-primary-rgb), 0.12); }
.ad-table tbody tr:last-child td { border-bottom: none; }

/* ══════════════════════════════════════════════════════════════
   Segmented · iOS Settings 分段控件
   ══════════════════════════════════════════════════════════════ */
.ad-segmented {
  display: inline-flex; padding: 2px;
  background: rgba(120, 120, 128, 0.10); border-radius: var(--r);
}
.ad-segmented > button {
  padding: 6px 14px; font-size: 13.5px; font-weight: 500;
  color: var(--text-2); background: transparent; border: none;
  border-radius: var(--r-sm); cursor: pointer;
  transition: all var(--dur) var(--ease-out);
}
.ad-segmented > button:hover { color: var(--text-1); }
.ad-segmented > button.active {
  background: #fff; color: var(--brand-primary); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}

/* ══════════════════════════════════════════════════════════════
   Tabs · 下划线 spring
   ══════════════════════════════════════════════════════════════ */
.ad-tabs {
  display: flex; gap: 24px;
  border-bottom: 0.5px solid var(--sep); margin-bottom: 16px;
}
.ad-tabs > button {
  background: transparent; border: none; padding: 12px 0;
  font: 500 14px inherit; color: var(--text-2); cursor: pointer;
  position: relative; transition: color var(--dur) var(--ease-out);
}
.ad-tabs > button:hover { color: var(--text-1); }
.ad-tabs > button.active { color: var(--brand-primary); font-weight: 700; }
.ad-tabs > button.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 3px; border-radius: 2px 2px 0 0;
  background: var(--brand-primary);
  transition: transform var(--dur-med) var(--ease-out);
}

/* ══════════════════════════════════════════════════════════════
   Modal · Drawer · Toast · Alert
   ══════════════════════════════════════════════════════════════ */
.ad-modal {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  backdrop-filter: saturate(200%) blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.14), 0 8px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 24px;
}
.ad-modal-close {
  width: 30px; height: 30px; border-radius: 15px;
  background: rgba(0, 0, 0, 0.06); border: none; color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.ad-modal-close:hover { background: rgba(0, 0, 0, 0.12); color: var(--text-1); }
.ad-modal-close:active { transform: scale(0.92); }

.ad-drawer {
  position: fixed; top: 0; bottom: 0; right: 0;
  width: min(480px, 92vw);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  backdrop-filter: saturate(200%) blur(40px);
  border-left: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  z-index: 1000; transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  will-change: transform;
}
.ad-drawer.open { transform: translateX(0); }

.ad-toast {
  background: rgba(28, 28, 30, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  color: #fff; padding: 12px 18px; border-radius: var(--r-lg);
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

.ad-alert { padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; border: none; color: var(--text-1); }
.ad-alert.info { background: rgba(var(--brand-primary-rgb), 0.10); }
.ad-alert.success { background: var(--ios-green-soft); }
.ad-alert.warn { background: var(--ios-orange-soft); }
.ad-alert.danger { background: var(--ios-red-soft); }

/* ══════════════════════════════════════════════════════════════
   Sidebar · Topbar · Menu · glass · 覆盖全站
   ══════════════════════════════════════════════════════════════ */
.ad-sidebar,
body:not([data-no-apple]) aside:not(.no-apple),
body:not([data-no-apple]) .sidebar:not(.no-apple),
body:not([data-no-apple]) nav.side-nav:not(.no-apple) {
  background: rgba(255, 255, 255, 0.45) !important;
  -webkit-backdrop-filter: saturate(220%) blur(48px) !important;
  backdrop-filter: saturate(220%) blur(48px) !important;
  border-right: 0.5px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.6) inset, 0 0 0 0.5px rgba(0, 0, 0, 0.04) !important;
}
.ad-topbar,
body:not([data-no-apple]) header.topbar,
body:not([data-no-apple]) .top-nav,
body:not([data-no-apple]) [class*="topbar"]:not(.no-apple) {
  background: rgba(255, 255, 255, 0.72) !important;
  -webkit-backdrop-filter: saturate(200%) blur(30px) !important;
  backdrop-filter: saturate(200%) blur(30px) !important;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06) !important;
  position: sticky; top: 0; z-index: 100;
}

/* 侧栏菜单项 · pill 圆角高亮 · 全站 nav a / menu-item · 但避免破坏 tab-btn */
body:not([data-no-apple]) aside a:not(.tab-btn):not(.no-apple),
body:not([data-no-apple]) .sidebar a:not(.tab-btn):not(.no-apple),
body:not([data-no-apple]) nav.side-nav a:not(.tab-btn):not(.no-apple),
body:not([data-no-apple]) .side a:not(.tab-btn):not(.no-apple) {
  border-radius: 10px;
  transition: all var(--dur, 200ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
body:not([data-no-apple]) aside a.active:not(.tab-btn),
body:not([data-no-apple]) aside a[aria-current]:not(.tab-btn),
body:not([data-no-apple]) .sidebar a.active:not(.tab-btn),
body:not([data-no-apple]) nav.side-nav a.active:not(.tab-btn),
body:not([data-no-apple]) .side a.active:not(.tab-btn) {
  background: var(--brand-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb, 0, 102, 255), 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}
body:not([data-no-apple]) aside a:not(.active):not(.tab-btn):hover,
body:not([data-no-apple]) .sidebar a:not(.active):not(.tab-btn):hover,
body:not([data-no-apple]) nav.side-nav a:not(.active):not(.tab-btn):hover,
body:not([data-no-apple]) .side a:not(.active):not(.tab-btn):hover {
  background: rgba(60, 60, 67, 0.06);
  color: var(--text-1);
}
.ad-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin: 2px 8px;
  font: 500 13.5px inherit; color: var(--text-2);
  border-radius: 9px; cursor: pointer;
  transition: all var(--dur) var(--ease-out);
}
.ad-menu-item:hover { background: rgba(60, 60, 67, 0.06); color: var(--text-1); }
.ad-menu-item.active {
  background: var(--brand-primary); color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(var(--brand-primary-rgb), 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.ad-menu-item:active { transform: scale(0.98); }

/* ══════════════════════════════════════════════════════════════
   Hero · 顶部大数字卡片
   ══════════════════════════════════════════════════════════════ */
.ad-hero {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-deep) 100%);
  color: #fff; border-radius: var(--r-2xl); padding: 24px 28px;
  box-shadow: 0 12px 40px rgba(var(--brand-primary-rgb), 0.24);
}
.ad-hero.pos { background: linear-gradient(135deg, #34c759 0%, #16a34a 100%); }
.ad-hero.neg { background: linear-gradient(135deg, #ff453a 0%, #dc2626 100%); }
.ad-hero.zero { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.ad-hero-label { opacity: 0.9; font-size: 13px; margin-bottom: 4px; }
.ad-hero-value { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; }

/* ══════════════════════════════════════════════════════════════
   Utility · 数字字体 · 隐形分隔
   ══════════════════════════════════════════════════════════════ */
.tnum, td.num, [class*="amount"], [class*="number"], .num {
  font-feature-settings: "tnum" 1, "cv11" 1;
  font-variant-numeric: tabular-nums;
}
.text-pos, .pos-text, .green, .pos { color: var(--ios-green); }
.text-neg, .neg-text, .red, .neg { color: var(--ios-red); }
.text-warn, .warn-text, .orange { color: var(--ios-orange); }
.text-muted, .muted, .gray { color: var(--text-3); }

/* =========================================================================
   v3 · 暴力覆盖层 · 让全站现有裸类立刻吃 Apple 样式
   ========================================================================= */

/* ── .card · 液态玻璃 · 大幅增透 · 22px · 让背景色透进来 ── */
body:not([data-no-apple]) .card:not(.no-apple) {
  background: rgba(255, 255, 255, 0.52) !important;                   /* 从 72% → 52% */
  -webkit-backdrop-filter: saturate(200%) blur(40px) !important;      /* 从 20 → 40px */
  backdrop-filter: saturate(200%) blur(40px) !important;
  border: 0.5px solid rgba(255, 255, 255, 0.7) !important;             /* 高光边更亮 */
  border-radius: var(--r-2xl, 22px) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,                          /* 顶部高光 · 光泽感 */
    0 2px 8px rgba(15, 23, 42, 0.03),                                 /* 主阴影 · 更淡 · 避免卡间暗缝 */
    0 0.5px 2px rgba(15, 23, 42, 0.02) !important;
  transition: box-shadow var(--dur, 200ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
              background var(--dur, 200ms) var(--ease-out);
}
/* ★ card 无 hover 阴影变化 · 静止状态即最终视觉 · 避免鼠标扫过一片"闪动" */
body:not([data-no-apple]) .card:not(.no-apple):hover {
  background: rgba(255, 255, 255, 0.56) !important;   /* 只微微加亮 · 不加阴影 */
}
/* clickable card 才允许阴影响应 */
body:not([data-no-apple]) .card.clickable:not(.no-apple):hover,
body:not([data-no-apple]) .card[role="button"]:not(.no-apple):hover,
body:not([data-no-apple]) .card[onclick]:not(.no-apple):hover {
  background: rgba(255, 255, 255, 0.66) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 24px rgba(15, 23, 42, 0.08) !important;
}
/* ★ 消除卡之间"暗缝"· 让父容器背景完全透明 */
body:not([data-no-apple]) .cfg-section-body,
body:not([data-no-apple]) .section,
body:not([data-no-apple]) .container,
body:not([data-no-apple]) main,
body:not([data-no-apple]) .main-content {
  background: transparent !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .card:not(.no-apple) {
  background: rgba(28, 28, 30, 0.72) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
body:not([data-no-apple]) .card-title:not(.no-apple) {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-1);
}
body:not([data-no-apple]) .card-desc:not(.no-apple),
body:not([data-no-apple]) .card-header:not(.no-apple) {
  color: var(--text-2);
}

/* ── .stat-card · KPI 数据卡 · 强玻璃 + 大字 ── */
body:not([data-no-apple]) .stat-card {
  background: rgba(255, 255, 255, 0.52) !important;
  -webkit-backdrop-filter: saturate(200%) blur(40px) !important;
  backdrop-filter: saturate(200%) blur(40px) !important;
  border: 0.5px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: var(--r-2xl, 22px) !important;
  padding: 20px 22px !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 2px 8px rgba(15, 23, 42, 0.03) !important;
  transition: all var(--dur, 200ms) var(--ease-out);
}
/* stat-card hover · 只轻微亮 · 无阴影抖动 */
body:not([data-no-apple]) .stat-card:hover {
  background: rgba(255, 255, 255, 0.58) !important;
}
/* clickable 才有 hover 起浮 */
body:not([data-no-apple]) .stat-card.clickable:hover,
body:not([data-no-apple]) .stat-card[onclick]:hover {
  background: rgba(255, 255, 255, 0.68) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 20px rgba(15, 23, 42, 0.06) !important;
  transform: translateY(-1px);
}
body:not([data-no-apple]) .stat-value, body:not([data-no-apple]) .qstat-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem) !important;
  line-height: 1.1;
}
body:not([data-no-apple]) .stat-label, body:not([data-no-apple]) .qstat-label {
  color: var(--text-2);
  font-size: 12px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ── .btn · SF Blue · pointer-down 反馈 ── */
body:not([data-no-apple]) .btn:not(.no-apple) {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 14px;
  font: 500 13.5px/1 inherit;
  letter-spacing: -0.1px;
  border-radius: var(--r-md, 12px) !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-1);
  cursor: pointer;
  user-select: none;
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-tap-highlight-color: transparent;
  transition:
    background var(--dur, 200ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    border-color var(--dur, 200ms) var(--ease-out),
    color var(--dur, 200ms) var(--ease-out),
    box-shadow var(--dur, 200ms) var(--ease-out),
    transform var(--dur-fast, 100ms) var(--ease-out);
}
body:not([data-no-apple]) .btn:not(.no-apple):hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(var(--brand-primary-rgb, 0, 102, 255), 0.35);
}
body:not([data-no-apple]) .btn:not(.no-apple):not(:disabled):active {
  transform: scale(0.97);
  filter: brightness(0.96);
}
/* Primary · 填色 SF blue */
body:not([data-no-apple]) .btn-primary:not(.no-apple),
body:not([data-no-apple]) .btn.primary:not(.no-apple),
body:not([data-no-apple]) button.primary:not(.no-apple) {
  background: var(--brand-primary) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb, 0, 102, 255), 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}
body:not([data-no-apple]) .btn-primary:not(.no-apple):hover:not(:disabled) {
  background: var(--brand-primary-deep, #0052cc) !important;
  box-shadow: 0 6px 16px rgba(var(--brand-primary-rgb, 0, 102, 255), 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.30) !important;
}
/* Ghost / outline */
body:not([data-no-apple]) .btn-ghost:not(.no-apple),
body:not([data-no-apple]) .btn.ghost:not(.no-apple) {
  background: transparent !important;
  border: 1px solid rgba(var(--brand-primary-rgb, 0, 102, 255), 0.35) !important;
  color: var(--brand-primary) !important;
}
body:not([data-no-apple]) .btn-ghost:not(.no-apple):hover:not(:disabled) {
  background: rgba(var(--brand-primary-rgb, 0, 102, 255), 0.10) !important;
  border-color: var(--brand-primary) !important;
}
/* Danger */
body:not([data-no-apple]) .btn-danger:not(.no-apple),
body:not([data-no-apple]) .btn.danger:not(.no-apple) {
  background: var(--ios-red) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(255, 69, 58, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

/* ★ 内联 style="background:#..." 的彩色按钮 · 强制白字 · 加发光阴影 */
/* 绿系 · #30, #34, #22c5, #10 */
body:not([data-no-apple]) button[style*="background:#3"],
body:not([data-no-apple]) button[style*="background: #3"],
body:not([data-no-apple]) button[style*="background:#22c"],
body:not([data-no-apple]) button[style*="background: #22c"],
body:not([data-no-apple]) button[style*="background:#10b"],
body:not([data-no-apple]) button[style*="background: #10b"],
body:not([data-no-apple]) a.btn[style*="background:#3"],
body:not([data-no-apple]) a.btn[style*="background: #3"] {
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(48, 209, 88, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
  font-weight: 600 !important;
}
/* 橙/黄/粉系 · #ff, #f9, #f5, #fb
   ★ 排除浅色 (#fff, #f0*, #f5f*, #f6*, #f7*, #f8*, #f9*, #fa*, #fb*, #fc*, #fd*, #fe*, #f0f*, #f5f7 · 会被误改成白字看不见) */
body:not([data-no-apple]) button[style*="background:#f"]:not([style*="#fff"]):not([style*="#f0f"]):not([style*="#f5f"]):not([style*="#f6f"]):not([style*="#f7f"]):not([style*="#f8f"]):not([style*="#f9f"]):not([style*="#faf"]):not([style*="#fbf"]):not([style*="#fcf"]):not([style*="#fdf"]):not([style*="#fef"]):not(.no-apple),
body:not([data-no-apple]) button[style*="background: #f"]:not([style*="#fff"]):not([style*="#f0f"]):not([style*="#f5f"]):not([style*="#f6f"]):not([style*="#f7f"]):not([style*="#f8f"]):not([style*="#f9f"]):not([style*="#faf"]):not([style*="#fbf"]):not([style*="#fcf"]):not([style*="#fdf"]):not([style*="#fef"]):not(.no-apple),
body:not([data-no-apple]) button[style*="background:#e5"]:not(.no-apple),
body:not([data-no-apple]) button[style*="background: #e5"]:not(.no-apple),
body:not([data-no-apple]) a.btn[style*="background:#f"]:not([style*="#fff"]):not([style*="#f0f"]):not([style*="#f5f"]):not(.no-apple),
body:not([data-no-apple]) a.btn[style*="background: #f"]:not([style*="#fff"]):not([style*="#f0f"]):not([style*="#f5f"]):not(.no-apple) {
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
  font-weight: 600 !important;
}
/* 蓝/紫系（品牌色残留）· #0, #1, #2 */
body:not([data-no-apple]) button[style*="background:#0"]:not([style*="background:#000"]):not([style*="background:#0f"]),
body:not([data-no-apple]) button[style*="background: #0"]:not([style*="background: #000"]),
body:not([data-no-apple]) button[style*="background:#2"],
body:not([data-no-apple]) button[style*="background: #2"] {
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
  font-weight: 600 !important;
}
/* 渐变按钮 · linear-gradient 一律白字 */
body:not([data-no-apple]) button[style*="linear-gradient"],
body:not([data-no-apple]) a[style*="linear-gradient"] {
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
  font-weight: 600 !important;
}

/* ── .tag / .badge · iOS Pill ── */
body:not([data-no-apple]) .tag:not(.no-apple),
body:not([data-no-apple]) .badge:not(.no-apple) {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.008em;
  line-height: 16px !important;
  border-radius: var(--r-pill, 999px) !important;
  background: rgba(var(--brand-primary-rgb, 0, 102, 255), 0.12);
  color: var(--brand-primary);
  border: none !important;
  white-space: nowrap;
}
body:not([data-no-apple]) .tag-good, .badge-good, .tag.good, .badge.good {
  background: var(--ios-green-soft) !important;
  color: #1b7d38 !important;
}
body:not([data-no-apple]) .tag-bad, .badge-bad, .tag.bad, .badge.bad {
  background: var(--ios-red-soft) !important;
  color: #b91b13 !important;
}
body:not([data-no-apple]) .tag-warn, .badge-warn, .tag.warn, .badge.warn {
  background: var(--ios-orange-soft) !important;
  color: #a45c00 !important;
}

/* ── .hero · 单独大 hero 用 · 若它是一个 grid 容器（内含 .hero-card）· 则跳过整块蓝渐变 ── */
body:not([data-no-apple]) .hero:not(.no-apple):not(.hero-grid) {
  border-radius: var(--r-2xl, 22px) !important;
  padding: 28px 32px !important;
  color: #fff !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 20px 60px rgba(var(--brand-primary-rgb, 0, 102, 255), 0.32),
    0 8px 24px rgba(var(--brand-primary-rgb, 0, 102, 255), 0.16) !important;
  position: relative;
  overflow: hidden;
}
body:not([data-no-apple]) .hero:not(.no-apple):not(.hero-grid):not([style*="background:linear"]):not([style*="background: linear"]) {
  background: linear-gradient(135deg,
    #007aff 0%,
    var(--brand-primary, #0066ff) 40%,
    #0052cc 80%,
    #003d99 100%) !important;
}
/* ★ .hero 若含 .hero-card 子元素 · 则是 grid 容器 · 完全透明 · 不加蓝底 */
body:not([data-no-apple]) .hero:has(.hero-card),
body:not([data-no-apple]) .hero[style*="grid-template"] {
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
  display: grid;
  gap: 16px;
}
body:not([data-no-apple]) .hero:has(.hero-card)::before,
body:not([data-no-apple]) .hero[style*="grid-template"]::before {
  display: none !important;
}
/* ★ .hero-card · grid 内的每个数据卡 · 玻璃卡 */
body:not([data-no-apple]) .hero-card {
  background: rgba(255, 255, 255, 0.52) !important;
  -webkit-backdrop-filter: saturate(200%) blur(40px) !important;
  backdrop-filter: saturate(200%) blur(40px) !important;
  border: 0.5px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: var(--r-2xl, 22px) !important;
  padding: 22px 24px !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 2px 8px rgba(15, 23, 42, 0.03) !important;
  transition: background var(--dur, 200ms) var(--ease-out);
}
body:not([data-no-apple]) .hero-card:hover {
  background: rgba(255, 255, 255, 0.62) !important;
}
body:not([data-no-apple]) .hero-card .label {
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
body:not([data-no-apple]) .hero-card .value {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
body:not([data-no-apple]) .hero-card .sub {
  color: var(--text-3);
  font-size: 12px;
}
/* Hero 内的大数字 · SF Pro Display 感 · 巨大 · 负 tracking */
body:not([data-no-apple]) .hero .hero-value,
body:not([data-no-apple]) .hero h1,
body:not([data-no-apple]) .hero [style*="font-size:32"], body:not([data-no-apple]) .hero [style*="font-size: 32"],
body:not([data-no-apple]) .hero [style*="font-size:36"], body:not([data-no-apple]) .hero [style*="font-size: 36"],
body:not([data-no-apple]) .hero [style*="font-size:40"], body:not([data-no-apple]) .hero [style*="font-size: 40"] {
  font-size: clamp(2.25rem, 5vw, 3.5rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.05 !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
/* Hero 内的 label · 半透 · 小字 */
body:not([data-no-apple]) .hero [class*="label"],
body:not([data-no-apple]) .hero .hero-label {
  opacity: 0.88 !important;
  font-size: 13px !important;
  letter-spacing: 0.02em;
  font-weight: 500;
}
/* Hero 光泽 · 用 box-shadow inset 顶部高光 · 不再用 ::before 覆盖 · 避免直角边 bug */
body:not([data-no-apple]) .hero:not(.no-apple):not(.hero-grid) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),                            /* 顶部 1px 亮线 · 光泽感 */
    0 20px 60px rgba(var(--brand-primary-rgb, 0, 102, 255), 0.32),
    0 8px 24px rgba(var(--brand-primary-rgb, 0, 102, 255), 0.16) !important;
}
/* 明确去掉可能存在的 ::before 假高光 · 避免直角残影 */
body:not([data-no-apple]) .hero:not(.no-apple)::before {
  display: none !important;
}

/* ── Modal · backdrop 磨砂 ── */
body:not([data-no-apple]) .modal-mask, body:not([data-no-apple]) .mask {
  background: rgba(0, 0, 0, 0.28) !important;
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  backdrop-filter: blur(6px) saturate(140%);
}
body:not([data-no-apple]) .modal:not(.no-apple),
body:not([data-no-apple]) .modal-body:not(.no-apple) {
  background: rgba(255, 255, 255, 0.92) !important;
  -webkit-backdrop-filter: saturate(200%) blur(40px) !important;
  backdrop-filter: saturate(200%) blur(40px) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: var(--r-xl, 18px) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.14), 0 8px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* ── input / select / textarea 全站统一 focus ring ── */
body:not([data-no-apple]) input:focus,
body:not([data-no-apple]) select:focus,
body:not([data-no-apple]) textarea:focus {
  outline: none;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb, 0, 102, 255), 0.12) !important;
}

/* ── table 行 hover 蓝 tint ── */
body:not([data-no-apple]) table:not(.no-apple) tbody tr:hover td {
  background: rgba(var(--brand-primary-rgb, 0, 102, 255), 0.05) !important;
}

/* ★ sticky 表头 · 强遮盖 · 避免下滚时下面文字透上来 ── */
body:not([data-no-apple]) thead th,
body:not([data-no-apple]) .table-header,
body:not([data-no-apple]) .th-sticky {
  background: rgba(255, 255, 255, 0.98) !important;      /* 近乎实白 · 挡住底下 */
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 5;
  color: var(--text-2) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.02em;
  border-bottom: 0.5px solid var(--sep) !important;
  /* 底部投影 · 视觉分隔 · scroll edge */
  box-shadow: 0 4px 8px -6px rgba(0, 0, 0, 0.08);
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) thead th {
  background: rgba(28, 28, 30, 0.98) !important;
}

/* ★ 表格长文本列 · 备注 / notes / desc · 加省略号防溢出 */
body:not([data-no-apple]) td[class*="note"],
body:not([data-no-apple]) td[class*="desc"],
body:not([data-no-apple]) td[class*="remark"],
body:not([data-no-apple]) td[data-col="notes"],
body:not([data-no-apple]) td[data-col="备注"] {
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 通用：table 内所有 td 默认不允许把 table 撑爆 · 除非明确不限 */
body:not([data-no-apple]) table:not(.no-apple):not([class*="unrestricted"]) {
  table-layout: auto;
  width: 100%;
}
body:not([data-no-apple]) table:not(.no-apple) td {
  max-width: 380px;              /* 单元格最长 380px · 超出截断（可被 style 覆盖）*/
  word-break: break-word;         /* 长文本自动换行 · 不撑爆表格 */
  overflow-wrap: break-word;
}
/* 备注/说明这种明显长文本列 · 强制换行 · 不用省略号 · 因为用户想看内容 */
body:not([data-no-apple]) td:last-child:not(.num):not([class*="action"]),
body:not([data-no-apple]) td[colspan="2"],
body:not([data-no-apple]) td[colspan="3"] {
  white-space: normal;
  word-break: break-word;
}
/* 表格容器可横滚 · 溢出时保持能查看 */
body:not([data-no-apple]) .table-wrap,
body:not([data-no-apple]) .tbl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-lg, 14px);
}

/* ★ 侧栏菜单圆角强制 · 覆盖任何可能的 border-radius: 0 · 修"直角"bug ── */
body:not([data-no-apple]) aside a,
body:not([data-no-apple]) .sidebar a,
body:not([data-no-apple]) nav.side-nav a,
body:not([data-no-apple]) .side a,
body:not([data-no-apple]) .menu-item,
body:not([data-no-apple]) .ad-menu-item {
  border-radius: 10px !important;
}

/* ── tab-btn.active 蓝加粗 · 下划线更粗 ── */
body:not([data-no-apple]) .tab-btn:not(.no-apple),
body:not([data-no-apple]) button[class*="tab"]:not(.no-apple) {
  transition: all var(--dur, 200ms) var(--ease-out);
}
body:not([data-no-apple]) .tab-btn.active:not(.no-apple),
body:not([data-no-apple]) button[class*="tab"].active:not(.no-apple),
body:not([data-no-apple]) [class*="tab-btn"][aria-selected="true"] {
  color: var(--brand-primary) !important;
  font-weight: 700 !important;
}

/* 大数字全站统一 · 有 tabular · SF 风 */
body:not([data-no-apple]) [style*="font-size:24"],
body:not([data-no-apple]) [style*="font-size: 24"],
body:not([data-no-apple]) [style*="font-size:28"],
body:not([data-no-apple]) [style*="font-size: 28"] {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em !important;
}

/* ── .sleek · admin 常用样式类 → 玻璃 ── */
body:not([data-no-apple]) .sleek {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-lg, 14px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ── .qstat 家族（agent 端数据卡）· 玻璃 ── */
body:not([data-no-apple]) .qstat {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--r-lg, 14px);
  padding: 14px 16px;
}
body:not([data-no-apple]) .qstat-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.015em;
  font-size: 22px;
}
body:not([data-no-apple]) .qstat-label {
  color: var(--text-2);
  font-size: 12px;
}
body:not([data-no-apple]) .qstat-sub {
  color: var(--text-3);
  font-size: 11.5px;
}

/* =========================================================================
   Dark Mode 全站覆盖 · /* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] · 所有玻璃件反色
   ========================================================================= */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .card:not(.no-apple),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .stat-card,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .hero-card,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .qstat,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .sleek {
  background: rgba(28, 28, 30, 0.85) !important;   /* 更实 · 内容清晰 · 不透过背景 */
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: rgba(235, 235, 245, 0.9) !important;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.04) inset,
    0 4px 12px rgba(0, 0, 0, 0.4) !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .card:not(.no-apple):hover,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .stat-card:hover,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .hero-card:hover {
  background: rgba(44, 44, 46, 0.72) !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .card-title,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .stat-value,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .qstat-value,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .hero-card .value {
  color: rgba(255, 255, 255, 0.95) !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .card-desc,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .card-header,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .stat-label,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .qstat-label,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .qstat-sub,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .hero-card .label,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .hero-card .sub,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .muted {
  color: rgba(235, 235, 245, 0.60) !important;
}

/* Dark · 表头 · sticky */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) thead th,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .table-header,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .th-sticky {
  background: rgba(28, 28, 30, 0.98) !important;
  color: rgba(235, 235, 245, 0.72) !important;
  border-bottom-color: rgba(255, 255, 255, 0.10) !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) table:not(.no-apple) tbody tr:hover td {
  background: rgba(var(--brand-primary-rgb, 10, 132, 255), 0.10) !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) table td {
  color: rgba(235, 235, 245, 0.90);
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Dark · 按钮 · default */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .btn:not(.no-apple):not([style*="background"]) {
  background: rgba(44, 44, 46, 0.72) !important;
  color: rgba(235, 235, 245, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .btn:not(.no-apple):not([style*="background"]):hover:not(:disabled) {
  background: rgba(58, 58, 60, 0.85) !important;
  border-color: rgba(var(--brand-primary-rgb, 10, 132, 255), 0.45) !important;
}

/* Dark · Sidebar / Topbar */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) aside:not(.no-apple),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .sidebar:not(.no-apple),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) nav.side-nav:not(.no-apple) {
  background: rgba(28, 28, 30, 0.55) !important;
  border-right-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06) inset !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) aside a:not(.tab-btn),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .sidebar a:not(.tab-btn),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) nav.side-nav a:not(.tab-btn) {
  color: rgba(235, 235, 245, 0.78);
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) aside a:not(.tab-btn):hover,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .sidebar a:not(.tab-btn):hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) header.topbar,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .top-nav,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [class*="topbar"]:not(.no-apple) {
  background: rgba(28, 28, 30, 0.72) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Dark · Input / focus ring */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) input,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) select,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) textarea {
  background: rgba(44, 44, 46, 0.55) !important;
  color: rgba(235, 235, 245, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) input:focus,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) select:focus,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) textarea:focus {
  background: rgba(58, 58, 60, 0.75) !important;
  border-color: var(--brand-primary, #0A84FF) !important;
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb, 10, 132, 255), 0.18) !important;
}

/* Dark · Modal · Toast · Alert */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .modal:not(.no-apple),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .modal-body:not(.no-apple) {
  background: rgba(28, 28, 30, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: rgba(235, 235, 245, 0.92);
}

/* Dark · tag / badge */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .tag:not(.no-apple),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .badge:not(.no-apple) {
  background: rgba(var(--brand-primary-rgb, 10, 132, 255), 0.20);
  color: #64B5FF;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .tag-good,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .badge-good {
  background: rgba(50, 215, 75, 0.18) !important;
  color: #4EDD70 !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .tag-bad,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .badge-bad {
  background: rgba(255, 69, 58, 0.20) !important;
  color: #FF6961 !important;
}

/* Dark · Chart · 让 Chart.js 也吃暗色（若可能）*/
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] canvas {
  filter: brightness(1.05);
}

/* =========================================================================
   Dark Mode · 兜底覆盖 · 处理 inline style="background:#fff" 之类硬编码
   ========================================================================= */

/* 内联白/浅灰底 · 强制变深 */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:#fff"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background: #fff"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:white"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background: white"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:#FFFFFF"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background: #FFFFFF"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:#fafafc"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:#f5"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background: #f5"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:#f6"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background: #f6"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:#f7"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background: #f7"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:#f8"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background: #f8"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background:#f9"]:not(button),
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="background: #f9"]:not(button) {
  background: rgba(44, 44, 46, 0.85) !important;
  color: rgba(235, 235, 245, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* 内联深色文字 · 强制变亮 */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#000"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #000"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#111"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #111"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#1"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #1"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#2"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #2"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#333"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #333"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#0f172a"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #0f172a"] {
  color: rgba(235, 235, 245, 0.92) !important;
}

/* 内联灰文字 · 微亮 */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#666"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #666"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#4b5563"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #4b5563"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color:#6b7280"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="color: #6b7280"] {
  color: rgba(235, 235, 245, 0.60) !important;
}

/* Dropdown / popover 兜底 · 常见 select/autocomplete popup */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .dropdown-menu,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .autocomplete-list,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .popover,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .menu-popup,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) ul[role="listbox"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [role="menu"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [role="listbox"] {
  background: rgba(28, 28, 30, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: rgba(235, 235, 245, 0.92) !important;
}
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .dropdown-menu li:hover,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [role="menu"] li:hover,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [role="listbox"] li:hover,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) .autocomplete-list li:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* 焦点环在深色下更柔（3px→2px · 亮度降） */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) input:focus,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) select:focus,
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) textarea:focus {
  box-shadow: 0 0 0 2px rgba(var(--brand-primary-rgb, 10, 132, 255), 0.32) !important;
}

/* 深色边框（内联 border 有 rgba(0,0,0,X) 之类） · 变白半透 */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="border:1px solid rgba(0,0,0"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="border:1px solid #e"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="border: 1px solid #e"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="border-color:#e"],
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] body:not([data-no-apple]) [style*="border-color: #e"] {
  border-color: rgba(255, 255, 255, 0.10) !important;
}

/* Chart canvas 里 tooltip · 让 Chart.js 在暗色下也显 SF 白字 · 用 filter 变通 */
/* ★ 深色暂停中 · 所有 [data-theme="dark"] 规则改为 [data-theme="__dark_disabled__"] · 永不匹配 */
[data-theme="__dark_disabled__"] .chartjs-tooltip { color: #fff !important; }
