/*
 * PeakPix 管理后台 · 统一界面层（2026-10 改版）
 * 只负责外观与动画：不改变任何接口、权限、账务或交付流程。
 * 首页、人工接管、飞书连接共用本文件；页面专属样式见各自的 CSS。
 * 符合 CSP：无内联样式、无外部字体，全部使用系统字体。
 */

/* ---------- 设计变量 ---------- */
:root {
  color-scheme: light;
  --pp-bg: #f5f6f8;
  --pp-surface: #ffffff;
  --pp-surface-2: #f9fafb;
  --pp-surface-3: #f2f4f7;
  --pp-border: #e4e7ec;
  --pp-border-strong: #d0d5dd;
  --pp-text: #101828;
  --pp-text-2: #3f4756;
  --pp-text-3: #5b6476;
  --pp-muted: #98a2b3;
  --pp-primary: #2e4fd8;
  --pp-primary-hover: #2440b8;
  --pp-primary-ink: #1e3ab8;
  --pp-primary-soft: #eef2ff;
  --pp-primary-line: #c7d2fe;
  --pp-primary-wash: #f5f7ff;
  --pp-series-2: #eb6834;
  --pp-orange: #f79009;
  --pp-orange-soft: #fff4e5;
  --pp-orange-ink: #a54a06;
  --pp-orange-deep: #7a3705;
  --pp-orange-line: #f6d9b0;
  --pp-green: #12a15a;
  --pp-green-soft: #e8f7ef;
  --pp-green-ink: #0b6e3e;
  --pp-green-line: #b7e4cb;
  --pp-red: #f04438;
  --pp-red-soft: #fdeeec;
  --pp-red-ink: #b42318;
  --pp-red-line: #fecdca;
  --pp-purple-soft: #f3eeff;
  --pp-purple-ink: #5b2fc2;
  --pp-radius-lg: 14px;
  --pp-radius: 12px;
  --pp-radius-sm: 8px;
  --pp-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --pp-shadow-md: 0 8px 24px rgba(16, 24, 40, .10);
  --pp-shadow-lg: 0 24px 56px rgba(16, 24, 40, .20);
  --pp-font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pp-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --pp-sidebar: 248px;
  --pp-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--pp-bg);
  color: var(--pp-text);
  font: 14px/1.6 var(--pp-font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 16px; line-height: 24px; font-weight: 600; }
h3 { font-size: 14px; line-height: 22px; font-weight: 600; }
a { color: var(--pp-primary); text-underline-offset: 3px; }
a:hover { color: var(--pp-primary-ink); }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--pp-primary); outline-offset: 2px; }
::selection { background: var(--pp-primary-soft); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
label { display: block; font-weight: 500; font-size: 14px; color: var(--pp-text); }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--pp-border-strong);
  border-radius: var(--pp-radius-sm);
  background: var(--pp-surface);
  color: var(--pp-text);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { padding: 10px 12px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pp-primary); box-shadow: 0 0 0 3px rgba(46, 79, 216, .15); }
input[readonly] { background: var(--pp-surface-2); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--pp-primary); flex: none; }
select { padding-right: 32px; }

/* 按钮 */
.primary, .secondary, .text-button, .table-action, .icon-button, .gift-action, .gift-detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--pp-radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.primary { border: 1px solid var(--pp-primary); background: var(--pp-primary); color: #fff; font-weight: 600; }
.primary:hover:not(:disabled) { background: var(--pp-primary-hover); border-color: var(--pp-primary-hover); color: #fff; }
.primary:active:not(:disabled) { transform: translateY(1px); }
.primary:disabled { border-color: var(--pp-border); background: var(--pp-surface-3); color: var(--pp-muted); }
.secondary, .gift-action { border: 1px solid var(--pp-border-strong); background: var(--pp-surface); color: var(--pp-text); }
.secondary:hover:not(:disabled), .gift-action:hover:not(:disabled) { border-color: #b7bfcc; background: var(--pp-surface-2); color: var(--pp-text); }
.secondary:disabled, .gift-action:disabled { border-color: var(--pp-border); background: var(--pp-surface-2); color: var(--pp-muted); }
.text-button { min-height: 36px; padding: 0 6px; border: 0; background: transparent; color: var(--pp-primary); }
.text-button:hover { color: var(--pp-primary-ink); background: var(--pp-primary-wash); }
.icon-button { width: 40px; padding: 0; border: 1px solid transparent; background: transparent; color: var(--pp-text-2); font-size: 18px; }
.icon-button:hover { background: var(--pp-surface-3); color: var(--pp-text); }
.table-action { min-height: 34px; padding: 0 12px; border: 1px solid var(--pp-primary); background: var(--pp-primary); color: #fff; font-weight: 600; font-size: 13px; }
.table-action:hover { background: var(--pp-primary-hover); }
.ui-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 文本与状态 */
.subtle { color: var(--pp-text-3); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; color: var(--pp-text-3); letter-spacing: .06em; }
.form-status { min-height: 20px; font-size: 13px; color: var(--pp-text-3); }
.form-status.error, .error { color: var(--pp-red-ink); }
.local-preview-notice { padding: 10px 14px; border: 1px solid var(--pp-orange-line); border-radius: var(--pp-radius-sm); background: var(--pp-orange-soft); color: var(--pp-orange-deep); font-size: 13px; }
.surface { background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: var(--pp-radius-lg); box-shadow: var(--pp-shadow); }

.status-tag, .task-badge, .feedback-state, .pp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--pp-surface-3);
  color: var(--pp-text-2);
}
.status-tag::before, .task-badge::before, .feedback-state::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: currentColor; flex: none; }
.status-tag.claimed, .status-tag.submitted, .task-badge.review, .feedback-state.new, .pp-chip.is-warn { background: var(--pp-orange-soft); color: var(--pp-orange-ink); }
.status-tag.confirmed, .task-badge.completed, .feedback-state.resolved, .pp-chip.is-ok { background: var(--pp-green-soft); color: var(--pp-green-ink); }
.status-tag.rejected, .task-badge.failed, .pp-chip.is-bad { background: var(--pp-red-soft); color: var(--pp-red-ink); }
.task-badge.running, .feedback-state.processing, .pp-chip.is-info { background: var(--pp-primary-soft); color: var(--pp-primary-ink); }
.status-tag.gifted { background: var(--pp-purple-soft); color: var(--pp-purple-ink); }
.task-badge.running::before { animation: pp-blink 1.4s ease-in-out infinite; }
.delta-positive { color: var(--pp-green-ink); font-weight: 600; }
.delta-negative { color: var(--pp-text); font-weight: 600; }

/* ---------- 登录 ---------- */
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: 1fr auto; background: var(--pp-bg); }
.login-brand { position: absolute; z-index: 2; top: clamp(24px, 4vw, 48px); left: clamp(24px, 4vw, 56px); display: flex; align-items: center; gap: 12px; color: #fff; font-size: 18px; font-weight: 700; }
.login-brand small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .16em; color: #aeb9ec; }
.brand-symbol { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--pp-primary); color: #fff; font-weight: 700; font-size: 17px; flex: none; }
.login-shell { display: contents; }
.login-intro {
  position: relative;
  grid-row: 1 / span 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 120px clamp(28px, 5vw, 72px) 64px;
  background: #14215e;
  color: #fff;
}
.login-intro::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -6%;
  width: 78%;
  height: 52%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 760 360' fill='none'%3E%3Cpath d='M0 330 170 150l90 100 70-80 160 180' stroke='%23ffffff' stroke-opacity='.10' stroke-width='2'/%3E%3Cpath d='M120 360 330 110l110 120 80-90 240 220' stroke='%23ffffff' stroke-opacity='.14' stroke-width='2'/%3E%3Cpath d='M300 360 470 170l60 70 60-60 170 180' stroke='%23aeb9ec' stroke-opacity='.24' stroke-width='2'/%3E%3Ccircle cx='330' cy='110' r='5' fill='%232e4fd8'/%3E%3C/svg%3E") right bottom / contain no-repeat;
  pointer-events: none;
  animation: pp-fade 1.2s ease-out .3s both;
}
.login-intro .eyebrow { color: #aeb9ec; letter-spacing: .16em; }
.login-intro h1 { font-size: clamp(34px, 4.2vw, 50px); line-height: 1.18; letter-spacing: -.02em; animation: pp-rise .6s var(--pp-ease) .1s both; }
.login-intro p { color: #c7d0f5; font-size: 16px; line-height: 1.7; animation: pp-rise .6s var(--pp-ease) .2s both; }
.login-feature-chips { display: flex; flex-wrap: wrap; gap: 10px; animation: pp-rise .6s var(--pp-ease) .3s both; }
.login-feature-chips span { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 13px; font-weight: 500; }
.intro-foot { color: #aeb9ec; font-size: 13px; margin-top: 8px; }
.login-card {
  align-self: center;
  justify-self: center;
  width: min(400px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 40px 0;
  animation: pp-rise .55s var(--pp-ease) .15s both;
}
.login-card h2 { font-size: 28px; line-height: 36px; letter-spacing: -.01em; }
.login-card label { margin-top: 8px; }
.login-card input { min-height: 46px !important; font-size: 15px !important; }
.secure-label { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--pp-primary-soft); color: var(--pp-primary-ink); font-size: 12px; font-weight: 600; }
.login-submit { min-height: 46px; margin-top: 14px; font-size: 15px; }
.login-note { margin-top: 6px; padding: 12px 14px; border: 1px solid var(--pp-border); border-radius: 10px; background: var(--pp-surface); color: var(--pp-text-2); font-size: 13px; line-height: 1.6; }
.login-footer { grid-column: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; padding: 0 16px 24px; color: var(--pp-text-3); font-size: 12px; }

/* ---------- 应用外壳 ---------- */
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: var(--pp-sidebar) minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  background: var(--pp-surface);
  border-right: 1px solid var(--pp-border);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; color: var(--pp-text); font-size: 16px; font-weight: 700; text-decoration: none; }
.sidebar-brand small { display: block; font-size: 12px; font-weight: 500; color: var(--pp-text-3); }
.sidebar-brand .brand-symbol { width: 34px; height: 34px; border-radius: 9px; font-size: 16px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label, .nav-group { padding: 12px 10px 6px; font-size: 12px; font-weight: 600; color: var(--pp-text-3); letter-spacing: .04em; }
.nav-label span { display: none; }
.nav-group:first-child { padding-top: 2px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--pp-radius-sm);
  background: transparent;
  color: var(--pp-text-2);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--pp-surface-2); color: var(--pp-text); }
.nav-item.active, .nav-item[aria-current="page"] { background: var(--pp-primary-soft); color: var(--pp-primary-ink); font-weight: 600; }
.nav-item.active .nav-icon, .nav-item[aria-current="page"] .nav-icon { color: var(--pp-primary); }
.nav-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--pp-text-3); flex: none; }
.nav-item > :not(.nav-icon):not(.nav-count):not(.nav-text-tag) { flex: 1; }
.nav-text-tag { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--pp-text-3); }
.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pp-orange-soft);
  color: var(--pp-orange-ink);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  animation: pp-pop .35s var(--pp-ease) both;
}
.sidebar-guide { display: none; }
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  background: var(--pp-surface-2);
}
.sidebar-bottom > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar-bottom strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom small { font-size: 12px; color: var(--pp-text-3); }
.admin-avatar { width: 36px; height: 36px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; background: #e0e7ff; color: var(--pp-primary-ink); font-weight: 700; flex: none; }
.sidebar-bottom .icon-button { width: 36px; min-height: 36px; font-size: 15px; }
.sidebar-back { display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--pp-text-3); font-size: 13px; text-decoration: none; }

.main-content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 12px clamp(16px, 2.5vw, 32px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--pp-border);
  backdrop-filter: saturate(1.4) blur(8px);
}
.topbar-leading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--pp-text-3); font-size: 13px; }
.breadcrumb strong { color: var(--pp-text); font-weight: 600; }
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--pp-text-3); font-size: 13px; }
.connection-state { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px; border-radius: 15px; background: var(--pp-surface-3); color: var(--pp-text-2); font-size: 12px; font-weight: 600; }
.connection-state::before { content: ""; width: 7px; height: 7px; border-radius: 4px; background: var(--pp-muted); }
.connection-state.connected { background: var(--pp-green-soft); color: var(--pp-green-ink); }
.connection-state.connected::before { background: var(--pp-green); box-shadow: 0 0 0 0 rgba(18, 161, 90, .5); animation: pp-pulse 2s ease-out infinite; }
.ui-menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--pp-border); border-radius: var(--pp-radius-sm); background: var(--pp-surface); color: var(--pp-text-2); align-items: center; justify-content: center; }
.mobile-logout { display: none; }

.workspace { width: 100%; max-width: 1360px; margin: 0 auto; padding: 28px clamp(16px, 2.5vw, 32px) 40px; display: flex; flex-direction: column; gap: 20px; }
.page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; animation: pp-rise .45s var(--pp-ease) both; }
.page-heading > div:first-child { display: flex; flex-direction: column; gap: 6px; }
.page-heading .eyebrow { display: none; }
.page-heading h1:focus { outline: none; }
.page-heading p { color: var(--pp-text-3); }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.workspace-status { padding: 12px 16px; border: 1px solid var(--pp-primary-line); border-radius: var(--pp-radius); background: var(--pp-primary-soft); color: var(--pp-primary-ink); font-size: 13px; animation: pp-rise .3s var(--pp-ease) both; }
.gift-pending { align-self: flex-start; border-color: var(--pp-orange-line); background: var(--pp-orange-soft); color: var(--pp-orange-deep); }
.view-panel { animation: pp-rise .4s var(--pp-ease) both; }
.workspace-footer { width: 100%; max-width: 1360px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 0 clamp(16px, 2.5vw, 32px) 18px; color: var(--pp-text-3); font-size: 12px; }
.admin-legal-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; padding: 18px 16px 28px; color: var(--pp-text-3); font-size: 12px; text-align: center; }
.admin-dashboard .admin-legal-footer { margin-left: var(--pp-sidebar); }
.admin-legal-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pp-primary); }

/* 同步倒计时 */
.pp-sync { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--pp-border); border-radius: 20px; background: var(--pp-surface); color: var(--pp-text-2); font-size: 13px; }
.pp-ring { width: 22px; height: 22px; transform: rotate(-90deg); flex: none; }
.pp-ring circle { fill: none; stroke-width: 3; }
.pp-ring .pp-ring-track { stroke: var(--pp-border); }
.pp-ring .pp-ring-fill { stroke: var(--pp-primary); stroke-linecap: round; stroke-dasharray: 50.27; transition: stroke-dashoffset .95s linear; }
.pp-sync b { font-weight: 600; color: var(--pp-text); font-variant-numeric: tabular-nums; }

/* ---------- 通用区块 ---------- */
.section-heading, .pp-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.section-heading > div, .pp-card-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.section-heading p, .pp-card-head p { color: var(--pp-text-3); font-size: 13px; }
.count-label { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 14px; background: var(--pp-surface-3); color: var(--pp-text-2); font-size: 12px; font-weight: 600; }
.view-panel.surface { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.filter-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pp-text-2); font-weight: 500; }
.filter-label select { width: auto; min-width: 140px; }
.monitor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.monitor-toolbar label { font-size: 13px; color: var(--pp-text-2); }
.monitor-toolbar input { max-width: 380px; }
.monitor-note { padding: 10px 14px; border-radius: 10px; background: var(--pp-surface-2); color: var(--pp-text-2); font-size: 13px; }
.monitor-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--pp-text-2); font-size: 13px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 16px; text-align: center; color: var(--pp-text-3); }
.empty-state strong { color: var(--pp-text); font-size: 15px; }
.empty-symbol { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--pp-surface-3); color: var(--pp-muted); font-size: 18px; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--pp-border); border-radius: var(--pp-radius); }
table { width: 100%; min-width: 860px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { padding: 10px 16px; background: var(--pp-surface-2); color: var(--pp-text-2); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--pp-border); }
td { padding: 12px 16px; border-bottom: 1px solid var(--pp-surface-3); vertical-align: middle; font-size: 13px; }
tbody tr { transition: background .15s; }
.pp-entering tbody tr { animation: pp-fade .35s ease-out both; }
tbody tr:hover { background: var(--pp-surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td strong { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; }
td:first-child strong { white-space: normal; overflow-wrap: anywhere; }
.view-panel.surface > .section-heading h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
td small { display: block; color: var(--pp-text-3); font-size: 12px; }
td > .secondary, td > a.secondary, td .gift-action { min-height: 32px; padding: 0 10px; font-size: 13px; margin: 2px 6px 2px 0; }
.user-link { padding: 0; border: 0; background: none; color: var(--pp-primary); font-weight: 600; font-size: 14px; text-align: left; }
.user-link:hover { color: var(--pp-primary-ink); text-decoration: underline; }

/* ---------- 总览：待你处理 ---------- */
.pp-overview { display: flex; flex-direction: column; gap: 20px; }
.pp-todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pp-todo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  background: var(--pp-surface);
  color: var(--pp-text);
  text-align: left;
  text-decoration: none;
  box-shadow: var(--pp-shadow);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  animation: pp-rise .5s var(--pp-ease) both;
}
.pp-todo-card:nth-child(2) { animation-delay: .05s; }
.pp-todo-card:nth-child(3) { animation-delay: .1s; }
.pp-todo-card:nth-child(4) { animation-delay: .15s; }
.pp-todo-card:hover { border-color: var(--pp-primary-line); box-shadow: var(--pp-shadow-md); transform: translateY(-1px); color: var(--pp-text); }
.pp-todo-icon { position: relative; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--pp-primary-soft); color: var(--pp-primary); flex: none; }
.pp-todo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-todo-title { font-size: 14px; font-weight: 600; }
.pp-todo-sub { font-size: 12px; color: var(--pp-text-3); }
.pp-todo-count { font-size: 24px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-todo-card.has-items { border-color: var(--pp-orange-line); }
.pp-todo-card.has-items .pp-todo-icon { background: var(--pp-orange-soft); color: var(--pp-orange-ink); }
.pp-todo-card.has-items .pp-todo-icon::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 5px; background: var(--pp-orange); box-shadow: 0 0 0 2px #fff; animation: pp-pulse-orange 1.8s ease-out infinite; }
.pp-todo-card.has-items .pp-todo-count { color: var(--pp-orange-deep); }

/* ---------- 总览：指标 ---------- */
.pp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pp-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 16px;
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius-lg);
  background: var(--pp-surface);
  box-shadow: var(--pp-shadow);
  animation: pp-rise .55s var(--pp-ease) both;
}
.pp-kpi:nth-child(1) { animation-delay: .08s; }
.pp-kpi:nth-child(2) { animation-delay: .14s; }
.pp-kpi:nth-child(3) { animation-delay: .2s; }
.pp-kpi:nth-child(4) { animation-delay: .26s; }
.pp-kpi-head { display: flex; align-items: center; gap: 8px; color: var(--pp-text-2); font-size: 13px; }
.pp-kpi-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--pp-primary-soft); color: var(--pp-primary); }
.pp-kpi-icon .ui-icon { width: 15px; height: 15px; stroke-width: 2; }
.pp-kpi-icon.is-orange { background: #fdefe8; color: #b4471b; }
.pp-kpi-value { font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.pp-kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 32px; }
.pp-kpi-note { font-size: 12px; color: var(--pp-text-3); }
.pp-kpi-note b { color: var(--pp-text); font-weight: 600; }
.pp-kpi-note .is-up { color: var(--pp-green-ink); font-weight: 600; }
.pp-spark { position: relative; width: 96px; height: 32px; flex: none; }
.pp-spark svg { display: block; width: 100%; height: 100%; overflow: visible; animation: pp-reveal 1.2s var(--pp-ease) .4s both; }
.pp-spark path { fill: none; stroke: #9db0f5; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pp-spark.is-orange path { stroke: #f4b49a; }
.pp-spark i { position: absolute; right: -3px; width: 7px; height: 7px; border-radius: 4px; background: var(--pp-primary); box-shadow: 0 0 0 2px #fff; transform: translateY(-50%); animation: pp-fade .3s ease-out 1.5s both; }
.pp-spark.is-orange i { background: var(--pp-series-2); }
.pp-meter { height: 6px; border-radius: 3px; background: #e0e7ff; overflow: hidden; display: flex; }
.pp-meter span { width: 0; border-radius: 3px; background: var(--pp-primary); transition: width 1.1s var(--pp-ease); }

/* ---------- 总览：图表卡片 ---------- */
.pp-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; animation: pp-rise .6s var(--pp-ease) .3s both; }
.pp-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.pp-row > .pp-wide { flex: 1.5 1 480px; min-width: 0; }
.pp-row > .pp-narrow { flex: 1 1 320px; min-width: 0; }
.pp-legend { display: flex; flex-wrap: wrap; gap: 20px; }
.pp-legend > div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--pp-text-2); }
.pp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pp-legend strong { font-size: 18px; line-height: 24px; font-weight: 600; color: var(--pp-text); font-variant-numeric: tabular-nums; }
.pp-legend .is-net strong { color: var(--pp-green-ink); }
.pp-key { width: 14px; height: 2px; border-radius: 1px; background: var(--pp-primary); }
.pp-key.is-out { background: var(--pp-series-2); }
.pp-note { font-size: 12px; color: var(--pp-text-3); }
.pp-chart-empty { display: flex; align-items: center; justify-content: center; min-height: 180px; border: 1px dashed var(--pp-border-strong); border-radius: var(--pp-radius); color: var(--pp-text-3); font-size: 13px; text-align: center; padding: 16px; }

/* 折线图 */
.pp-line { display: grid; grid-template-columns: 44px minmax(0, 1fr) 88px; grid-template-rows: 240px 26px; column-gap: 8px; }
.pp-axis-y { position: relative; }
.pp-axis-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--pp-text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-plot { position: relative; }
.pp-plot svg { display: block; width: 100%; height: 240px; overflow: visible; }
.pp-grid-line { stroke: #eef0f3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.pp-grid-base { stroke: var(--pp-border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pp-lines { position: absolute; inset: -6px; padding: 6px; pointer-events: none; }
.pp-lines.is-animated { animation: pp-reveal 1.6s cubic-bezier(.4, 0, .2, 1) .35s both; }
.pp-series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pp-series.is-in { stroke: var(--pp-primary); }
.pp-series.is-out { stroke: var(--pp-series-2); }
.pp-dot { position: absolute; width: 9px; height: 9px; border-radius: 5px; background: var(--pp-primary); box-shadow: 0 0 0 2px #fff; transform: translate(-50%, -50%); pointer-events: none; }
.pp-dot.is-out { background: var(--pp-series-2); }
.pp-dot.is-end { animation: pp-fade .3s ease-out 1.9s both; }
.pp-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--pp-muted); pointer-events: none; }
.pp-hits { position: absolute; top: 0; bottom: 0; display: flex; }
.pp-hits button { flex: 1; height: 100%; padding: 0; border: 0; background: transparent; cursor: crosshair; }
.pp-hits button:focus-visible { outline: none; background: rgba(46, 79, 216, .06); }
.pp-tip {
  position: absolute;
  top: 8px;
  z-index: 3;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--pp-border);
  border-radius: 10px;
  background: var(--pp-surface);
  box-shadow: var(--pp-shadow-md);
  font-size: 12px;
  color: var(--pp-text-3);
  pointer-events: none;
  animation: pp-fade .12s ease-out both;
}
.pp-tip-row { display: flex; align-items: center; gap: 8px; color: var(--pp-text-3); }
.pp-tip-row strong { color: var(--pp-text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-tip-net { padding-top: 6px; border-top: 1px solid var(--pp-surface-3); color: var(--pp-text-2); }
.pp-tip-net b { font-weight: 600; }
.pp-tip-net b.is-up { color: var(--pp-green-ink); }
.pp-tip-net b.is-down { color: var(--pp-red-ink); }
.pp-end-labels { position: relative; }
.pp-end-labels span { position: absolute; left: 10px; transform: translateY(-50%); display: flex; flex-direction: column; font-size: 11px; color: var(--pp-text-3); animation: pp-fade .4s ease-out 1.9s both; }
.pp-end-labels b { color: var(--pp-text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-axis-x { position: relative; }
.pp-axis-x span { position: absolute; top: 8px; transform: translateX(-50%); font-size: 11px; color: var(--pp-text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 柱状图 */
.pp-columns { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: 170px 22px; column-gap: 8px; }
.pp-cols { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--pp-border-strong); }
.pp-cols .pp-gridline { position: absolute; left: 0; right: 0; height: 1px; background: #eef0f3; }
.pp-col { position: relative; flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.pp-col:focus-visible { outline: none; background: rgba(46, 79, 216, .05); }
.pp-col-bar { position: relative; width: 60%; max-width: 24px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--pp-primary); transform-origin: bottom; transition: background .15s; }
.pp-col-bar.is-animated { animation: pp-grow-y .7s var(--pp-ease) both; }
.pp-col:hover .pp-col-bar, .pp-col:focus-visible .pp-col-bar, .pp-col.is-on .pp-col-bar { background: var(--pp-primary-ink); }
.pp-col-bar.is-zero { background: var(--pp-border); }
.pp-col-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 7px; border: 1px solid var(--pp-border); border-radius: 6px; background: var(--pp-surface); box-shadow: 0 2px 6px rgba(16, 24, 40, .08); color: var(--pp-text); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.pp-cols-x { display: flex; gap: 2px; }
.pp-cols-x span { flex: 1; min-width: 0; padding-top: 6px; text-align: center; font-size: 11px; color: var(--pp-text-3); white-space: nowrap; overflow: visible; }

/* 横向条 */
.pp-mix { display: flex; flex-direction: column; gap: 14px; }
.pp-mix-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 13px; }
.pp-mix-row > span { color: var(--pp-text-2); }
.pp-mix-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pp-mix-bar { height: 14px; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--pp-primary); transform-origin: left; }
.pp-mix-bar.is-animated { animation: pp-grow-x .9s var(--pp-ease) both; }
.pp-mix-val { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-mix-val b { font-weight: 600; }
.pp-mix-val span { color: var(--pp-text-3); }

/* 实时流水线 */
.pp-live-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.pp-live-stats { flex: 0 1 230px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 16px 18px; border-radius: var(--pp-radius); background: var(--pp-surface-2); }
.pp-live-stats div { display: flex; flex-direction: column; gap: 2px; }
.pp-live-stats span { font-size: 12px; color: var(--pp-text-2); }
.pp-live-stats strong { display: inline-flex; align-items: center; gap: 10px; font-size: 30px; line-height: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-live-stats .is-small strong { font-size: 20px; line-height: 26px; }
.pp-pulse-dot { position: relative; width: 10px; height: 10px; border-radius: 5px; background: var(--pp-green); }
.pp-pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 5px; background: var(--pp-green); animation: pp-ping 2s ease-out infinite; }
.pp-pipeline { flex: 1 1 520px; min-width: 0; margin: 0; padding: 4px 0; list-style: none; display: flex; align-items: center; overflow-x: auto; }
.pp-stage { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; }
.pp-stage strong { width: 54px; height: 54px; border-radius: 14px; border: 1px solid var(--pp-border); background: var(--pp-surface); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; transition: transform .3s var(--pp-ease); }
.pp-stage span { font-size: 12px; color: var(--pp-text-2); }
.pp-stage.is-active strong { border-color: var(--pp-primary-line); background: var(--pp-primary-soft); color: var(--pp-primary-ink); }
.pp-stage.is-warn strong { border-color: var(--pp-orange-line); background: var(--pp-orange-soft); color: var(--pp-orange-deep); }
.pp-stage.is-done strong { border-color: var(--pp-green-line); background: var(--pp-green-soft); color: var(--pp-green-ink); }
.pp-stage.is-bump strong { animation: pp-pop .45s var(--pp-ease); }
.pp-link { position: relative; flex: 1 1 40px; min-width: 32px; height: 2px; margin-bottom: 22px; background: var(--pp-border); }
.pp-link i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 4px; background: var(--pp-primary); opacity: 0; animation: pp-flow 2.4s linear infinite; }
.pp-link i + i { animation-delay: 1.2s; }
.pp-link.is-green i { background: var(--pp-green); }
.pp-link.is-idle i { animation: none; }
.pp-live-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pp-pill-link { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--pp-border); border-radius: var(--pp-radius-sm); background: var(--pp-surface-2); color: var(--pp-text-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.pp-pill-link:hover { color: var(--pp-text); border-color: var(--pp-border-strong); }
.pp-pill-link.is-warn { border-color: var(--pp-orange-line); background: var(--pp-orange-soft); color: var(--pp-orange-deep); font-weight: 600; }
.ui-live-label { display: inline-flex; align-items: center; gap: 7px; min-height: 22px; padding: 0 9px; border-radius: 11px; background: var(--pp-green-soft); color: var(--pp-green-ink); font-size: 12px; font-weight: 600; }
.ui-live-label i { position: relative; width: 7px; height: 7px; border-radius: 4px; background: var(--pp-green); }
.ui-live-label i::after { content: ""; position: absolute; inset: 0; border-radius: 4px; background: var(--pp-green); animation: pp-ping 1.6s ease-out infinite; }
.pp-title-row, .pp-card-head > .pp-title-row { display: flex; flex-direction: row; align-items: center; gap: 10px; }

/* 最近任务 / 充值核验 */
.recent-tasks .task-list { display: flex; flex-direction: column; gap: 0; }
.recent-tasks .task-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) auto; grid-template-areas: "top title link" "top fee link"; gap: 2px 16px; align-items: center; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--pp-surface-3); border-radius: 0; box-shadow: none; }
.pp-entering .recent-tasks .task-card { animation: pp-rise .4s var(--pp-ease) both; }
.recent-tasks .task-card:nth-child(2) { animation-delay: .06s; }
.recent-tasks .task-card:nth-child(3) { animation-delay: .12s; }
.recent-tasks .task-card:nth-child(4) { animation-delay: .18s; }
.recent-tasks .task-card:last-child { border-bottom: 0; }
.recent-tasks .task-card > .task-top { grid-area: top; flex-direction: column; align-items: flex-start; gap: 4px; }
.recent-tasks .task-card > .task-title { grid-area: title; font-size: 14px; }
.recent-tasks .task-card > .task-fee { grid-area: fee; }
.recent-tasks .task-card > a.secondary { grid-area: link; min-height: 34px; font-size: 13px; padding: 0 12px; }
.recent-tasks .task-card > .task-stage, .recent-tasks .task-card > progress, .recent-tasks .task-card > small { display: none; }
.overview-orders { display: flex; flex-direction: column; }
.mini-order { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--pp-surface-3); }
.pp-entering .mini-order { animation: pp-rise .4s var(--pp-ease) both; }
.mini-order:last-child { border-bottom: 0; }
.mini-order > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-order small { color: var(--pp-text-3); font-size: 12px; }
.mini-order-right { align-items: flex-end; }
.mini-order-right strong { font-size: 15px; font-variant-numeric: tabular-nums; }

/* 规则卡片 */
.rules-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.rules-heading { display: flex; align-items: center; gap: 10px; }
.rules-heading p { font-size: 13px; color: var(--pp-text-3); }
.section-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--pp-primary-soft); color: var(--pp-primary); flex: none; }
.pp-rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.exchange-rate { display: flex; align-items: baseline; gap: 6px; padding: 14px 16px; border-radius: 10px; background: var(--pp-surface-2); font-size: 13px; color: var(--pp-text-2); }
.exchange-rate strong { font-size: 22px; font-weight: 600; color: var(--pp-text); }
.package-list { display: contents; }
.package-list span { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--pp-border); border-radius: 10px; font-size: 13px; color: var(--pp-text-3); }
.package-list b { color: var(--pp-text); font-size: 14px; }
.rules-card > p { font-size: 13px; color: var(--pp-text-2); }
.rule-note { display: flex; align-items: center; gap: 8px; color: var(--pp-orange-deep) !important; }
.rule-note .ui-icon { width: 16px; height: 16px; }

/* ---------- 任务卡片（任务动态 / 用户详情） ---------- */
.task-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.task-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--pp-border); border-radius: var(--pp-radius); background: var(--pp-surface); }
.pp-entering .task-card { animation: pp-rise .4s var(--pp-ease) both; }
.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.task-top > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-top strong { font-size: 12px; color: var(--pp-text-3); font-weight: 600; }
.task-title { font-size: 15px; font-weight: 600; color: var(--pp-text); }
.task-stage { font-size: 13px; color: var(--pp-text-2); }
.task-fee { font-size: 13px; color: var(--pp-text); font-weight: 500; }
.task-card small { font-size: 12px; color: var(--pp-text-3); overflow-wrap: anywhere; }
.task-card > a.secondary { align-self: flex-start; min-height: 34px; margin-top: 4px; padding: 0 12px; font-size: 13px; }
progress { width: 100%; height: 6px; border: 0; border-radius: 3px; overflow: hidden; background: var(--pp-surface-3); appearance: none; }
progress::-webkit-progress-bar { background: var(--pp-surface-3); border-radius: 3px; }
progress::-webkit-progress-value { background: var(--pp-primary); border-radius: 3px; transition: width .6s var(--pp-ease); }
progress::-moz-progress-bar { background: var(--pp-primary); border-radius: 3px; }

/* ---------- 反馈 ---------- */
#feedbackList { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.feedback-admin-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--pp-border); border-radius: var(--pp-radius); background: var(--pp-surface); }
.pp-entering .feedback-admin-card { animation: pp-rise .4s var(--pp-ease) both; }
.feedback-admin-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-admin-card p { color: var(--pp-text); line-height: 1.65; }
.feedback-admin-card small { color: var(--pp-text-3); font-size: 12px; }
.feedback-admin-card .secondary { align-self: flex-start; min-height: 34px; padding: 0 12px; font-size: 13px; }
#feedbackAdminStatus:empty { display: none; }
.feedback-full-message { padding: 14px 16px; border: 1px solid var(--pp-border); border-radius: 10px; background: var(--pp-surface-2); line-height: 1.7; white-space: pre-wrap; }
.feedback-admin-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.feedback-admin-media figure { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--pp-border); border-radius: 10px; }
.feedback-admin-media img, .feedback-admin-media video { width: 100%; border-radius: 6px; background: var(--pp-surface-3); }
.feedback-admin-media figcaption { font-size: 12px; color: var(--pp-text-2); overflow-wrap: anywhere; }
.feedback-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px solid var(--pp-surface-3); }
.feedback-detail-actions select { width: auto; min-width: 140px; }

/* ---------- 弹窗 ---------- */
dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--pp-surface);
  color: var(--pp-text);
  box-shadow: var(--pp-shadow-lg);
  overflow: auto;
}
dialog[open] { animation: pp-dialog-in .28s var(--pp-ease) both; }
dialog::backdrop { background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px); animation: pp-fade .2s ease-out both; }
dialog > form, dialog > div:not(.dialog-heading), #userDetailBody, #feedbackDetailBody { display: flex; flex-direction: column; gap: 12px; }
dialog > form { padding: 0 24px 24px; }
dialog > h2 { padding: 0 24px; font-size: 20px; line-height: 28px; }
#userDetailBody, #feedbackDetailBody { padding: 12px 24px 0; }
.feedback-detail-actions { margin: 12px 24px 24px; }
.dialog-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 8px; background: var(--pp-surface); }
dialog > form > .dialog-heading { margin: 0 -24px; }
.dialog-heading .eyebrow { color: var(--pp-primary); }
#confirmDialog .dialog-heading .eyebrow { color: var(--pp-orange-ink); letter-spacing: .12em; }
#membershipGiftDialog .dialog-heading .eyebrow { color: var(--pp-purple-ink); }
dialog form h2 { font-size: 20px; line-height: 28px; }
.confirm-summary { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; margin: 0; padding: 14px 16px; border: 1px solid var(--pp-border); border-radius: var(--pp-radius); background: var(--pp-surface-2); font-size: 13px; }
.confirm-summary dt { color: var(--pp-text-3); }
.confirm-summary dd { margin: 0; color: var(--pp-text); font-weight: 500; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.verify-check { display: flex !important; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--pp-orange-line); border-radius: 10px; background: var(--pp-orange-soft); color: var(--pp-orange-deep); font-size: 13px; line-height: 1.6; font-weight: 500; cursor: pointer; }
.verify-check input { margin-top: 2px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.gift-equivalent { font-size: 12px; color: var(--pp-text-3); margin-top: -4px; }
.membership-gift-rules { padding: 12px 14px; border: 1px solid var(--pp-orange-line); border-radius: 10px; background: var(--pp-orange-soft); color: var(--pp-orange-deep); font-size: 13px; line-height: 1.65; }
#membershipGiftFields { display: flex; flex-direction: column; gap: 12px; }
.membership-gift-receipt { display: flex; flex-direction: column; gap: 10px; animation: pp-rise .35s var(--pp-ease) both; }
.membership-gift-receipt h3 { display: flex; align-items: center; gap: 8px; color: var(--pp-green-ink); font-size: 16px; }
.membership-gift-receipt h3::before { content: "✓"; width: 24px; height: 24px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--pp-green); color: #fff; font-size: 13px; animation: pp-pop .45s var(--pp-ease) both; }
#userDetailDialog { width: min(640px, calc(100vw - 32px)); }
#userDetailDialog > h2 { font-family: var(--pp-mono); font-size: 18px; }
#userDetailBody > p { color: var(--pp-text-2); font-size: 13px; }
.user-balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.user-balances dt { font-size: 12px; color: var(--pp-text-2); padding: 12px 14px 0; background: var(--pp-surface-2); border-radius: 10px 10px 0 0; }
.user-balances dd { margin: -10px 0 0; padding: 0 14px 12px; background: var(--pp-surface-2); border-radius: 0 0 10px 10px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.user-balances { grid-auto-flow: dense; }
.user-balances dt:nth-of-type(odd) { grid-column: 1; }
.user-balances dd:nth-of-type(odd) { grid-column: 1; }
.user-balances dt:nth-of-type(even) { grid-column: 2; }
.user-balances dd:nth-of-type(even) { grid-column: 2; }
#userDetailBody h3 { margin-top: 8px; }
#userDetailBody .task-list { grid-template-columns: 1fr; }
.gift-detail-action { align-self: flex-start; }
#userDetailBody > .primary, #userDetailBody > .secondary { display: inline-flex; width: auto; }
.detail-ledger { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--pp-surface-3); font-size: 13px; }
.detail-ledger span { text-align: right; font-variant-numeric: tabular-nums; }
.detail-ledger small { grid-column: 1 / -1; color: var(--pp-text-3); font-size: 12px; }
.gift-note { color: var(--pp-purple-ink) !important; }
#userDetailBody > :last-child { margin-bottom: 24px; }

/* ---------- 动画 ---------- */
@keyframes pp-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pp-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pp-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pp-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pp-ping { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(2.7); opacity: 0; } }
@keyframes pp-pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 161, 90, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(18, 161, 90, 0); } }
@keyframes pp-pulse-orange { 0% { box-shadow: 0 0 0 2px #fff, 0 0 0 2px rgba(247, 144, 9, .5); } 70%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 9px rgba(247, 144, 9, 0); } }
@keyframes pp-flow { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes pp-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pp-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pp-spin { to { transform: rotate(360deg); } }
@keyframes pp-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pp-drawer-in { from { opacity: .4; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes pp-scan { from { top: 0; } to { top: calc(100% - 2px); } }
@keyframes pp-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .login-view { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .login-intro { grid-row: auto; padding: 96px 24px 40px; }
  .login-intro::after { display: none; }
  .login-footer { grid-column: 1; }
}
@media (max-width: 720px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); height: auto; transform: translateX(-104%); transition: transform .28s var(--pp-ease); box-shadow: var(--pp-shadow-lg); }
  body.ui-nav-open .sidebar { transform: none; }
  body.ui-nav-open::after { content: ""; position: fixed; inset: 0; z-index: 50; background: rgba(16, 24, 40, .4); animation: pp-fade .2s ease-out both; }
  .ui-menu-button { display: inline-flex; }
  .ui-current-date { display: none; }
  .mobile-logout { display: inline-flex; min-height: 36px; }
  .admin-dashboard .admin-legal-footer { margin-left: 0; }
  .workspace { padding-top: 20px; }
  h1 { font-size: 22px; line-height: 30px; }
  .pp-kpi-value { font-size: 26px; line-height: 32px; }
  .pp-line { grid-template-columns: 36px minmax(0, 1fr) 64px; grid-template-rows: 200px 26px; }
  .pp-plot svg { height: 200px; }
  .pp-axis-x .is-minor { display: none; }
  .recent-tasks .task-card { grid-template-columns: 1fr; grid-template-areas: "top" "title" "fee" "link"; }
  .recent-tasks .task-card > a.secondary { justify-self: start; }
  .table-wrap { border: 0; overflow: visible; }
  .table-wrap table { min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap tr { margin-bottom: 10px; padding: 8px 4px; border: 1px solid var(--pp-border); border-radius: var(--pp-radius); background: var(--pp-surface); }
  .table-wrap td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 6px 12px; border: 0; }
  .table-wrap td::before { content: attr(data-label); color: var(--pp-text-3); font-size: 12px; }
  .confirm-summary { grid-template-columns: 1fr; gap: 2px; }
  .confirm-summary dd { margin-bottom: 8px; }
  .dialog-actions > * { flex: 1 1 auto; }
  .pp-live-stats { flex-basis: 100%; flex-direction: row; justify-content: space-between; }
  .pp-pipeline { flex-basis: 100%; overflow: visible; }
  .pp-stage { flex: 1 1 0; min-width: 52px; }
  .pp-stage strong { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }
  .pp-link { flex: 0 1 28px; min-width: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .pp-link i { display: none; }
}
