:root {
  --ink: #172b35;
  --muted: #70818b;
  --line: #dde7ea;
  --line-strong: #cad8dc;
  --surface: #ffffff;
  --canvas: #f3f7f7;
  --primary: #0b8f83;
  --primary-dark: #08736a;
  --primary-soft: #e3f5f2;
  --danger: #c74747;
  --warning: #b27212;
  --shadow-sm: 0 8px 24px rgba(29, 65, 72, .07);
  --shadow-lg: 0 26px 70px rgba(19, 54, 61, .16);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 95% 0, rgba(177, 226, 218, .28), transparent 28%), var(--canvas); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: var(--primary); }
.hidden { display: none !important; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 78% 20%, rgba(82, 201, 183, .4), transparent 28%), linear-gradient(145deg, #102f38, #0a6d68 62%, #d9efeb); }
.login-panel { width: min(430px, 100%); padding: 44px; border: 1px solid rgba(255,255,255,.55); border-radius: 26px; background: rgba(255,255,255,.97); box-shadow: 0 35px 100px rgba(4,28,32,.3); backdrop-filter: blur(20px); }
.login-panel h1 { margin: 24px 0 5px; font-size: 28px; letter-spacing: -.03em; }
.login-panel p { margin: 0 0 30px; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: white; background: linear-gradient(145deg, #10a395, #087369); box-shadow: 0 12px 25px rgba(11,143,131,.25); font: 800 29px/1 Georgia, serif; }
.brand-mark.small { width: 42px; height: 42px; border-radius: 13px; font-size: 20px; box-shadow: none; }

label { display: block; margin-bottom: 17px; color: #405660; font-weight: 700; }
input, select, textarea { width: 100%; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--ink); background: #fff; outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
input:hover, select:hover, textarea:hover { border-color: #a8bbc1; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(11,143,131,.11); }
input:disabled, textarea:disabled { color: #637781; background: #f3f6f7; }
textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
.form-error { min-height: 20px; margin-top: 12px; color: var(--danger); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 17px 18px; color: #dcecea; background: linear-gradient(180deg, #143942, #102f38); box-shadow: 12px 0 34px rgba(18,51,58,.08); }
.brand { display: flex; align-items: center; gap: 13px; padding: 0 8px 29px; color: white; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { margin-top: 4px; color: #8eb9b7; font-size: 11px; font-weight: 400; }
nav { display: grid; gap: 6px; }
nav button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 12px; color: #b8cfce; background: transparent; text-align: left; transition: .18s ease; }
nav button i { width: 24px; color: #87aaa9; font-style: normal; font-size: 18px; text-align: center; }
nav button:hover { color: white; background: rgba(255,255,255,.07); transform: translateX(2px); }
nav button.active { color: #fff; background: linear-gradient(100deg, rgba(18,166,151,.7), rgba(15,120,113,.42)); box-shadow: inset 0 0 0 1px rgba(102,226,211,.14); }
nav button.active i { color: #e4fffb; }
.sidebar-footer { margin-top: auto; padding: 20px 11px 3px; display: grid; gap: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer > span { color: #fff; font-weight: 700; }
.link-button { padding: 0; border: 0; color: #a8c8c7; background: transparent; text-align: left; font-size: 13px; }
.danger-text { color: #ffb7b7; }

.main { min-width: 0; }
.topbar { min-height: 88px; display: flex; align-items: center; gap: 15px; padding: 16px 34px; border-bottom: 1px solid rgba(203,218,222,.75); background: rgba(255,255,255,.82); backdrop-filter: blur(18px); }
.topbar-title { min-width: 0; }
.topbar h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.topbar-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.topbar-meta a { margin-left: 12px; padding: 8px 11px; border-radius: 9px; color: #326068; background: #edf4f4; text-decoration: none; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #19ad7a; box-shadow: 0 0 0 4px rgba(25,173,122,.12); }
.content { max-width: 1680px; padding: 28px 34px 55px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 11px; color: #3a525d; background: transparent; font-size: 22px; }
.icon-button:hover { background: #edf3f4; }
#menu-button { display: none; }

.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding: 4px 2px; }
.toolbar .filters { display: flex; align-items: end; gap: 11px; flex-wrap: wrap; }
.toolbar label { margin: 0; font-size: 12px; }
.toolbar input, .toolbar select { min-width: 170px; margin-top: 5px; padding: 9px 11px; }
.button { min-height: 40px; padding: 9px 15px; border: 1px solid var(--line-strong); border-radius: 10px; color: #2f4752; background: #fff; font-weight: 700; transition: .16s ease; }
.button:hover:not(:disabled) { border-color: #9eb2b8; box-shadow: 0 5px 14px rgba(30,63,70,.08); transform: translateY(-1px); }
.button.primary { border-color: var(--primary); color: white; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 8px 18px rgba(11,143,131,.17); }
.button.danger { border-color: #efc5c5; color: var(--danger); background: #fff8f8; }
.button.small { min-height: 32px; padding: 5px 10px; border-radius: 8px; font-size: 12px; }
.button.block { width: 100%; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { position: relative; min-height: 137px; overflow: hidden; padding: 22px; border: 1px solid rgba(213,226,229,.9); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat::after { content: ""; position: absolute; right: -27px; top: -31px; width: 90px; height: 90px; border-radius: 50%; background: rgba(11,143,131,.08); }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin: 12px 0 8px; font-size: 30px; letter-spacing: -.035em; }
.stat small { color: #93a0a7; font-size: 11px; }
.stat.accent-blue::after { background: rgba(55,119,210,.09); }
.stat.accent-violet::after { background: rgba(125,89,196,.09); }
.stat.accent-orange::after { background: rgba(221,139,47,.11); }

.panel { margin-bottom: 20px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.95); box-shadow: var(--shadow-sm); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 17px; }
.panel-header h3 { margin: 0; font-size: 17px; }
.panel-header.subheading { margin-top: 24px; }
.section-description { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid #e6edef; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 13px 12px; border-bottom: 1px solid #e9eff1; text-align: left; vertical-align: middle; }
th { color: #60727b; background: #f7fafb; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f8fbfb; }
tbody tr:last-child td { border-bottom: 0; }
td.wrap { min-width: 230px; white-space: normal; word-break: break-all; }
td small { color: var(--muted); }
.actions { display: flex; align-items: center; gap: 7px; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; color: #4f626c; background: #edf2f3; font-size: 11px; font-weight: 700; }
.badge.success { color: #087058; background: #dff4ec; }
.badge.danger { color: #a83838; background: #fae4e4; }
.badge.warning { color: #875307; background: #f8edd8; }
.activity-label { display: inline-block; padding: 6px 10px; border-radius: 8px; color: #0b7168; background: #e5f5f2; font-weight: 700; }
.empty { padding: 44px; color: var(--muted); text-align: center; }
.empty-state { flex: 1; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); }
.empty-state strong { color: #4b626c; }
.empty-state span { font-size: 12px; }
.pagination { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 26px; background: rgba(10,31,37,.55); backdrop-filter: blur(8px); }
.modal-panel { width: min(940px, 100%); max-height: calc(100vh - 52px); overflow: hidden; border: 1px solid rgba(255,255,255,.55); border-radius: 22px; background: #fff; box-shadow: var(--shadow-lg); }
.modal-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 20px 25px; border-bottom: 1px solid var(--line); }
.modal-panel h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.modal-content { max-height: calc(100vh - 125px); overflow-y: auto; padding: 25px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full, label.full { grid-column: 1 / -1; }
.form-help { margin: -5px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.form-help code { padding: 2px 5px; border-radius: 5px; color: #176c66; background: #eaf5f3; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.notice-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.setting-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfb; }
.setting-card h4 { margin: 0 0 7px; color: var(--primary); font-size: 17px; }
.setting-card > p { min-height: 38px; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.setting-card .form-grid { grid-template-columns: 1fr; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 10px 0 20px; }
.checkbox-grid label { display: flex; align-items: center; gap: 9px; margin: 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.checkbox-grid input { width: auto; margin: 0; }
.priority-list { display: grid; gap: 9px; margin: 16px 0; }
.priority-item { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; }
.priority-number { display: grid; place-items: center; width: 34px; height: 34px; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-weight: 800; }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 50; max-width: 400px; padding: 14px 18px; border-radius: 12px; color: white; background: #183b42; box-shadow: var(--shadow-lg); }
.toast.error { background: #a93737; }

.chart-bars { height: 250px; display: flex; align-items: end; gap: 10px; padding: 22px 8px 0; border-bottom: 1px solid var(--line); }
.chart-column { position: relative; flex: 1; min-width: 27px; display: grid; align-items: end; height: 100%; text-align: center; }
.chart-column i { display: block; min-height: 3px; background: linear-gradient(180deg, #26bbaa, #0b8177); border-radius: 7px 7px 2px 2px; box-shadow: 0 6px 12px rgba(11,143,131,.12); }
.chart-column em { margin-bottom: 6px; color: #60747c; font-size: 10px; font-style: normal; }
.chart-column span { margin-top: 8px; color: var(--muted); font-size: 10px; }
.test-intro { margin-bottom: 18px; padding: 16px; border-radius: 12px; background: #eef8f6; }
.test-intro span { color: var(--primary); font-weight: 800; }
.test-intro p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.test-result { margin: 12px 0; padding: 15px; border-radius: 12px; }
.test-result pre, .json-view { max-height: 330px; overflow: auto; margin: 12px 0 0; padding: 15px; border-radius: 10px; color: #d7f2ed; background: #17343c; font: 12px/1.65 Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.success-box { color: #0a6955; background: #e4f6ef; }
.error-box { padding: 14px; border-radius: 11px; color: #9f3737; background: #fdeaea; }
.error-box p { margin-bottom: 0; }
.user-summary { display: flex; align-items: center; gap: 13px; margin: -3px 0 22px; padding: 16px; border-radius: 13px; background: #f0f7f6; }
.avatar-placeholder { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: var(--primary); font-size: 19px; font-weight: 800; }
.user-summary strong, .user-summary span { display: block; }
.user-summary span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.detail-grid > div { padding: 14px; border-radius: 11px; background: #f4f8f8; }
.detail-grid span, .detail-grid strong { display: block; }
.detail-grid span { margin-bottom: 6px; color: var(--muted); font-size: 11px; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 25; left: -280px; width: 260px; transition: left .22s ease; }
  .sidebar.open { left: 0; }
  #menu-button { display: grid; }
  .topbar-meta { display: none; }
}
@media (max-width: 680px) {
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .stats-grid, .form-grid, .notice-settings-grid { grid-template-columns: 1fr; }
  .form-grid .full, label.full { grid-column: auto; }
  .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar .filters { align-items: stretch; flex-direction: column; }
  .toolbar input, .toolbar select { min-width: 100%; }
  .modal-backdrop { padding: 10px; }
  .modal-panel { max-height: calc(100vh - 20px); border-radius: 16px; }
  .modal-content { padding: 18px; }
  .priority-item { grid-template-columns: 32px 1fr; }
  .priority-item .actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* 2026 小程序同款视觉：青绿到蓝色渐变、轻量卡片与明亮工作台 */
:root {
  --ink: #17303b;
  --muted: #71858f;
  --line: #e5edf1;
  --line-strong: #cfdee4;
  --canvas: #f5f8fa;
  --primary: #16bfaf;
  --primary-dark: #0ca99c;
  --primary-soft: #e8f9f6;
  --blue: #4a90ff;
  --shadow-sm: 0 12px 32px rgba(48, 79, 94, .07);
  --shadow-lg: 0 30px 90px rgba(20, 55, 69, .2);
  --radius: 20px;
}

body {
  background:
    radial-gradient(circle at 92% 4%, rgba(74,144,255,.09), transparent 24%),
    radial-gradient(circle at 18% 0, rgba(22,216,201,.1), transparent 26%),
    var(--canvas);
}

.login-shell {
  min-height: 100vh;
  padding: 34px;
  background:
    radial-gradient(circle at 8% 10%, rgba(43,224,207,.2), transparent 24%),
    radial-gradient(circle at 92% 86%, rgba(74,144,255,.2), transparent 27%),
    linear-gradient(145deg, #edfdfb 0%, #eef5ff 52%, #f7fbfd 100%);
}
.login-stage {
  width: min(1080px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 34px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 38px 110px rgba(51,88,106,.18);
}
.login-showcase {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 52px;
  color: #fff;
  background: linear-gradient(145deg, #10c8b7 0%, #20cfc6 38%, #4a90ff 100%);
}
.login-showcase::after {
  content: "";
  position: absolute;
  right: -95px;
  bottom: 70px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 44% 56% 62% 38%;
  transform: rotate(18deg);
}
.showcase-glow { position: absolute; border-radius: 50%; filter: blur(2px); }
.glow-one { top: -90px; right: -40px; width: 280px; height: 280px; background: rgba(255,255,255,.13); }
.glow-two { left: -100px; bottom: -110px; width: 320px; height: 320px; background: rgba(1,91,139,.13); }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.login-brand .brand-mark { color: #16bfae; background: #fff; box-shadow: 0 16px 35px rgba(5,111,128,.2); }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 19px; }
.login-brand small { margin-top: 5px; color: rgba(255,255,255,.72); font-size: 11px; }
.showcase-copy { position: relative; z-index: 1; margin: auto 0; }
.showcase-chip { display: inline-block; padding: 7px 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.11); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.showcase-copy h2 { margin: 22px 0 18px; font-size: clamp(34px, 4vw, 50px); line-height: 1.25; letter-spacing: -.05em; }
.showcase-copy p { max-width: 390px; margin: 0; color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.85; }
.showcase-features { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px; }
.showcase-features span { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.13); font-size: 11px; }
.showcase-features span::before { content: "✓"; margin-right: 6px; color: #fff; font-weight: 900; }
.login-panel {
  width: auto;
  align-self: center;
  padding: 64px 62px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-panel .eyebrow { color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.login-panel h1 { margin: 13px 0 8px; font-size: 34px; }
.login-panel > p { margin-bottom: 38px; }
.login-mobile-brand { display: none; }
.input-shell { display: flex; align-items: center; margin-top: 9px; border: 1px solid var(--line-strong); border-radius: 14px; background: #f9fbfc; transition: .18s; }
.input-shell:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(22,191,175,.1); }
.input-shell > span { width: 46px; color: #8aa0aa; font-size: 18px; text-align: center; }
.input-shell input { margin: 0; padding: 14px 13px 14px 0; border: 0; background: transparent; box-shadow: none; }
.input-shell input:focus { box-shadow: none; }
.login-submit { display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin-top: 8px; padding: 12px 19px; border: 0; border-radius: 14px; }
.login-submit b { font-size: 20px; }
.login-security { color: #98a8af; font-size: 11px; text-align: center; }
.login-security::before { content: "●"; margin-right: 6px; color: #27bf8c; font-size: 9px; }
.system-failure { width: min(650px, 100%); padding: 42px; border: 1px solid rgba(255,255,255,.9); border-radius: 28px; background: rgba(255,255,255,.96); box-shadow: 0 30px 90px rgba(41,78,94,.17); }
.system-failure .eyebrow { display: block; margin-top: 24px; color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.system-failure h1 { margin: 10px 0; font-size: 28px; }
.system-failure > p, .system-failure > small { color: var(--muted); }
.system-failure ul { margin: 22px 0; padding: 17px 20px 17px 38px; border-radius: 14px; color: #9d4646; background: #fff2f2; line-height: 1.9; }
.command-box { margin: 20px 0; padding: 16px; border-radius: 14px; color: #dff; background: #163b48; }
.command-box span, .command-box code { display: block; }
.command-box span { margin-bottom: 8px; color: #91b2bd; font-size: 11px; }
.command-box code { word-break: break-all; }

.brand-mark { background: linear-gradient(135deg, #20d6c6, #4a90ff); box-shadow: 0 12px 26px rgba(40,177,203,.24); }
.app-shell { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar {
  margin: 16px 0 16px 16px;
  height: calc(100vh - 32px);
  padding: 22px 16px 18px;
  color: var(--ink);
  border: 1px solid rgba(225,235,239,.9);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 20px 54px rgba(50,81,96,.09);
  backdrop-filter: blur(18px);
}
.brand { color: var(--ink); }
.brand small { color: #8ba0aa; }
nav button { color: #617984; font-weight: 700; }
nav button i { color: #8ea4ae; }
nav button:hover { color: #1d7885; background: #f0fbfa; }
nav button.active { color: #fff; background: linear-gradient(100deg, #20d6c6, #4a90ff); box-shadow: 0 12px 25px rgba(45,173,211,.22); }
.sidebar-footer { border-top-color: var(--line); }
.sidebar-footer > span { color: var(--ink); }
.link-button { color: #718792; }
.danger-text { color: #d76666; }
.topbar { min-height: 94px; margin-left: 16px; padding: 17px 34px; border-bottom: 0; background: transparent; backdrop-filter: none; }
.topbar h2 { font-size: 26px; }
.topbar-meta a { color: #277d91; background: rgba(255,255,255,.84); box-shadow: 0 6px 18px rgba(51,88,105,.05); }
.content { padding-top: 12px; }
.button { border-radius: 12px; }
.button.primary { border: 0; background: linear-gradient(100deg, #20d6c6, #4a90ff); box-shadow: 0 10px 22px rgba(45,173,211,.2); }
.panel, .stat { border-color: rgba(225,235,239,.9); background: rgba(255,255,255,.92); }
.stat { min-height: 145px; }
.stat::after { right: -20px; top: -25px; width: 105px; height: 105px; background: linear-gradient(135deg, rgba(32,214,198,.12), rgba(74,144,255,.1)); }
.table-wrap { border-color: #e8eff2; border-radius: 15px; }
th { color: #6c818b; background: #f7fafc; }
tbody tr:hover { background: #f3fbfb; }
.modal-backdrop { background: rgba(16,45,57,.48); backdrop-filter: blur(12px); }
.modal-panel { width: min(880px, 100%); border-radius: 26px; box-shadow: 0 34px 100px rgba(18,54,70,.24); }
.modal-panel > header { padding: 22px 28px; background: linear-gradient(90deg, rgba(232,249,246,.65), rgba(239,246,255,.55)); }
.modal-content { padding: 28px; }
.form-actions .button.primary { min-width: 104px; }
.chart-column i { background: linear-gradient(180deg, #4a90ff, #20d6c6); }
.toast { background: linear-gradient(100deg, #153c49, #245d70); }

@media (max-width: 960px) {
  .login-stage { grid-template-columns: 1fr; width: min(500px, 100%); min-height: auto; }
  .login-showcase { display: none; }
  .login-panel { padding: 46px 40px; }
  .login-mobile-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 34px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { left: -290px; width: 272px; margin: 10px; height: calc(100vh - 20px); }
  .sidebar.open { left: 0; }
  .topbar { margin-left: 0; }
}
@media (max-width: 560px) {
  .login-shell { padding: 14px; }
  .login-stage { border-radius: 24px; }
  .login-panel { padding: 38px 24px; }
  .login-panel h1 { font-size: 29px; }
}

.form-section-title { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg,#edf9f7,#f2f7ff); }
.form-section-title > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 10px; color: #fff; background: linear-gradient(135deg,var(--primary),#4a90ff); font-weight: 800; }
.form-section-title strong,.form-section-title small { display: block; }
.form-section-title small { margin-top: 3px; color: var(--muted); font-weight: 400; }
.mapping-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; padding: 18px; border: 1px solid #dce9e9; border-radius: 16px; background: #fbfdfd; }
.mapping-help { padding: 13px 15px; border-left: 3px solid var(--primary); color: var(--muted); background: #f2faf8; line-height: 1.7; }
.platform-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.platform-picker-head label { display: flex; align-items: center; gap: 7px; }
.platform-picker-head input { width: auto; margin: 0; }
.advanced-settings { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfd; }
.advanced-settings summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.advanced-settings .form-grid { margin-top: 16px; }
.form-actions.compact { margin-top: -6px; }
.path-picker { display: grid; gap: 8px; max-height: 340px; overflow: auto; }
.path-choice { display: grid; grid-template-columns: minmax(180px,.8fr) 1.2fr; gap: 12px; padding: 11px 13px; border: 1px solid #dce6e9; border-radius: 11px; text-align: left; background: #fff; cursor: pointer; }
.path-choice:hover { border-color: var(--primary); background: #f2fbf9; }
.path-choice code { overflow: hidden; color: #087b72; text-overflow: ellipsis; }
.path-choice span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.test-result h4 { margin: 18px 0 9px; }
.mapping-warning { margin-top: 13px; padding: 11px 13px; border-radius: 11px; color: #8a5a12; background: #fff4d8; }

/* 数据概览：会员支付与购买数量统计 */
.stat.accent-red::after { background: rgba(215, 91, 91, .12); }
.dashboard-payment-header { align-items: flex-end; flex-wrap: wrap; }
.dashboard-date-filter { display: flex; align-items: flex-end; gap: 9px; }
.dashboard-date-filter label { margin: 0; color: var(--muted); font-size: 11px; }
.dashboard-date-filter input { min-width: 148px; margin: 6px 0 0; padding: 8px 10px; }
.dashboard-date-filter > span { padding-bottom: 9px; color: var(--muted); font-size: 12px; }
.dashboard-quick-ranges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -3px 0 18px; }
.dashboard-quick-ranges > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.payment-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
.payment-summary-grid > div { padding: 15px 16px; border: 1px solid #e5eef1; border-radius: 14px; background: linear-gradient(145deg, #fbfefe, #f6fafc); }
.payment-summary-grid span, .payment-summary-grid strong, .payment-summary-grid small { display: block; }
.payment-summary-grid span { color: var(--muted); font-size: 11px; }
.payment-summary-grid strong { margin: 7px 0 5px; color: var(--ink); font-size: 20px; }
.payment-summary-grid small { color: #91a1a8; font-size: 10px; }
.payment-summary-grid .negative strong { color: #c95757; }
.payment-chart-legend { display: flex; align-items: center; gap: 18px; margin-bottom: 9px; color: #627780; font-size: 11px; }
.payment-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.payment-chart-legend i { width: 9px; height: 9px; border-radius: 3px; }
.payment-chart-legend i.payment { background: linear-gradient(180deg, #4a90ff, #20b9d6); }
.payment-chart-legend i.refund { background: linear-gradient(180deg, #ffb55b, #ec7f61); }
.payment-chart-legend small { margin-left: auto; color: #96a5ab; }
.payment-chart-scroll { overflow-x: auto; padding: 7px 0 3px; border: 1px solid #e7eef1; border-radius: 15px; background: linear-gradient(180deg, #fbfdfe 0%, #f8fbfc 100%); }
.payment-chart { display: flex; align-items: stretch; height: 270px; padding: 20px 16px 0; }
.payment-chart-day { flex: 1; min-width: 36px; display: grid; grid-template-rows: minmax(0, 1fr) 30px; text-align: center; }
.payment-chart-bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 0; padding: 0 4px; border-bottom: 1px solid #dce7eb; }
.payment-chart-bars i { width: min(12px, 42%); min-height: 0; border-radius: 5px 5px 1px 1px; transition: opacity .16s, filter .16s; }
.payment-chart-day:hover .payment-chart-bars i { filter: saturate(1.15); opacity: .82; }
.payment-chart-bars .payment-bar { background: linear-gradient(180deg, #4a90ff, #20b9d6); box-shadow: 0 5px 11px rgba(55, 133, 221, .14); }
.payment-chart-bars .refund-bar { background: linear-gradient(180deg, #ffb55b, #ec7f61); box-shadow: 0 5px 11px rgba(225, 126, 87, .14); }
.payment-chart-day > span { padding-top: 8px; color: #85969e; font-size: 9px; }
.dashboard-chart-empty { min-height: 190px; border: 1px dashed #dbe6ea; border-radius: 14px; background: #fafcfd; }
.plan-comparison { display: grid; gap: 13px; }
.plan-comparison-row { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.6fr) 70px; align-items: center; gap: 18px; }
.plan-comparison-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.plan-comparison-name > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #20d6c6, #4a90ff); font-size: 11px; font-weight: 800; }
.plan-comparison-name div { min-width: 0; }
.plan-comparison-name strong, .plan-comparison-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-comparison-name strong { font-size: 13px; }
.plan-comparison-name small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.plan-comparison-track { height: 13px; overflow: hidden; border-radius: 999px; background: #edf3f5; }
.plan-comparison-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #20d6c6, #4a90ff); box-shadow: 0 5px 12px rgba(49, 166, 213, .16); }
.plan-comparison-value { text-align: right; }
.plan-comparison-value strong { font-size: 18px; }
.plan-comparison-value span { margin-left: 3px; color: var(--muted); font-size: 10px; }
@media (max-width: 720px) {
  .mapping-grid { grid-template-columns: 1fr; }
  .path-choice { grid-template-columns: 1fr; }
  .path-choice span { white-space: normal; }
  .dashboard-date-filter { width: 100%; align-items: stretch; flex-wrap: wrap; }
  .dashboard-date-filter label { flex: 1; min-width: 135px; }
  .dashboard-date-filter input { width: 100%; min-width: 0; }
  .dashboard-date-filter > span { display: none; }
  .dashboard-date-filter .button { align-self: flex-end; }
  .dashboard-quick-ranges > span { width: 100%; margin-left: 0; }
  .payment-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-chart-legend { flex-wrap: wrap; }
  .payment-chart-legend small { width: 100%; margin-left: 0; }
  .plan-comparison-row { grid-template-columns: minmax(0, 1fr) 54px; gap: 10px; }
  .plan-comparison-track { grid-column: 1 / -1; grid-row: 2; }
}

/* 后台移动端：侧栏抽屉、数据概览与会员支付卡片 */
.sidebar-backdrop { display: none; border: 0; }
.dashboard-chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }

@media (max-width: 960px) {
  .app-shell.menu-open { height: 100vh; overflow: hidden; }
  .sidebar { z-index: 42; overflow: hidden; }
  .sidebar nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 41;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(18, 43, 54, .42);
    backdrop-filter: blur(3px);
    transition: opacity .2s ease, visibility .2s ease;
  }
  .app-shell.menu-open .sidebar-backdrop { visibility: visible; opacity: 1; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(245, 248, 250, .9);
    box-shadow: 0 1px 0 rgba(207, 222, 228, .75);
    backdrop-filter: blur(18px);
  }
}

@media (max-width: 680px) {
  body { background: #f5f8fa; }
  .sidebar {
    left: -310px;
    width: min(82vw, 286px);
    height: calc(100dvh - 16px);
    margin: 8px;
    padding: max(18px, env(safe-area-inset-top)) 13px max(14px, env(safe-area-inset-bottom));
    border-radius: 20px;
  }
  .sidebar.open { left: 0; }
  .brand { padding: 0 7px 19px; }
  nav { gap: 4px; }
  nav button { min-height: 44px; padding: 10px 12px; }
  .sidebar-footer { padding: 14px 10px 2px; }
  .topbar { min-height: 68px; padding-left: 12px; padding-right: 12px; }
  .topbar h2 { font-size: 20px; }
  .topbar p { overflow: hidden; max-width: 68vw; margin-top: 3px; text-overflow: ellipsis; white-space: nowrap; }
  #menu-button { flex: 0 0 42px; width: 42px; height: 42px; background: rgba(255,255,255,.9); box-shadow: 0 6px 18px rgba(48,79,94,.08); }
  .content { width: 100%; padding: 14px 12px calc(30px + env(safe-area-inset-bottom)); }

  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 15px; }
  .stat { min-height: 112px; padding: 15px 13px; border-radius: 16px; }
  .stat::after { right: -28px; top: -32px; width: 88px; height: 88px; }
  .stat span { font-size: 11px; }
  .stat strong { margin: 9px 0 6px; font-size: clamp(20px, 6vw, 25px); }
  .stat strong, .payment-summary-grid strong { overflow-wrap: anywhere; }
  .stat small { display: block; overflow: hidden; font-size: 10px; line-height: 1.45; text-overflow: ellipsis; }

  .panel { margin-bottom: 14px; padding: 14px 12px; border-radius: 17px; }
  .panel-header { align-items: flex-start; margin-bottom: 13px; }
  .panel-header h3 { font-size: 16px; }
  .panel-header > .badge { flex: 0 0 auto; }
  .section-description { line-height: 1.65; }
  .toolbar { gap: 10px; margin-bottom: 12px; padding: 0; }
  .toolbar .filters { gap: 9px; }
  .toolbar .filters > .badge { white-space: normal; }
  .toolbar > .button { width: 100%; }
  .toolbar .filters > .button { min-height: 44px; }
  .button { min-height: 44px; }
  .button.small { min-height: 38px; padding: 7px 11px; }
  input, select, textarea { min-height: 44px; font-size: 16px; }

  .dashboard-payment-header { display: block; }
  .dashboard-date-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
  .dashboard-date-filter label { min-width: 0; }
  .dashboard-date-filter .button { grid-column: 1 / -1; width: 100%; }
  .dashboard-quick-ranges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .dashboard-quick-ranges .button { width: 100%; }
  .dashboard-quick-ranges > span { grid-column: 1 / -1; width: auto; }
  .payment-summary-grid { gap: 8px; margin-bottom: 14px; }
  .payment-summary-grid > div { padding: 12px; }
  .payment-summary-grid strong { font-size: 18px; }
  .payment-chart-legend { gap: 12px; }
  .payment-chart { height: 230px; padding-top: 15px; }
  .payment-chart-scroll, .dashboard-chart-scroll { scrollbar-width: thin; }
  .dashboard-chart-scroll { margin: 0 -2px; padding-bottom: 4px; }
  .dashboard-chart-scroll .chart-bars { min-width: 560px; height: 220px; }
  .plan-comparison-row { padding: 2px 0 7px; border-bottom: 1px solid #edf2f4; }
  .plan-comparison-row:last-child { border-bottom: 0; }

  .detail-grid { gap: 8px; }
  .detail-grid > div { min-width: 0; padding: 11px; }
  .detail-grid strong { overflow-wrap: anywhere; font-size: 12px; }

  .table-wrap { max-width: 100%; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .table-wrap:not(.mobile-card-table) table { min-width: 680px; }
  .mobile-card-table { overflow: visible; border: 0; background: transparent; }
  .mobile-card-table table,
  .mobile-card-table tbody { display: block; width: 100%; white-space: normal; }
  .mobile-card-table thead { display: none; }
  .mobile-card-table tbody { display: grid; gap: 10px; }
  .mobile-card-table tbody tr {
    display: block;
    overflow: hidden;
    padding: 5px 12px;
    border: 1px solid #e3edf0;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f9fcfd);
    box-shadow: 0 7px 18px rgba(48,79,94,.05);
  }
  .mobile-card-table tbody tr:hover { background: linear-gradient(145deg, #fff, #f9fcfd); }
  .mobile-card-table td {
    position: relative;
    display: block;
    min-height: 40px;
    padding: 10px 0 10px 104px;
    border-bottom: 1px solid #edf2f4;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .mobile-card-table td::before {
    content: attr(data-label);
    position: absolute;
    top: 10px;
    left: 0;
    width: 92px;
    color: #71858f;
    font-size: 11px;
    font-weight: 800;
    text-align: left;
  }
  .mobile-card-table td:last-child { border-bottom: 0; }
  .mobile-card-table tbody tr:last-child td:not(:last-child) { border-bottom: 1px solid #edf2f4; }
  .mobile-card-table td.wrap { min-width: 0; }
  .mobile-card-table td code { white-space: normal; word-break: break-all; }
  .mobile-card-table td .actions { justify-content: flex-end; flex-wrap: wrap; }
  .mobile-card-table td[colspan] { min-height: 0; padding: 30px 10px; text-align: center; }
  .mobile-card-table td[colspan]::before { content: none; }

  .pagination { justify-content: center; flex-wrap: wrap; margin-top: 13px; }
  .pagination .button { flex: 1; min-width: 104px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal-panel { width: 100%; max-height: calc(100dvh - 18px); border-radius: 22px 22px 0 0; }
  .modal-panel > header { padding: 17px 18px; }
  .modal-content { max-height: calc(100dvh - 84px); padding: 18px 14px calc(20px + env(safe-area-inset-bottom)); }
  .form-actions { position: sticky; bottom: 0; z-index: 2; margin-left: -14px; margin-right: -14px; padding: 13px 14px max(13px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
  .form-actions .button { flex: 1; }
  .toast { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; max-width: none; text-align: center; }
}

@media (max-width: 370px) {
  .stats-grid { grid-template-columns: 1fr; }
  .payment-summary-grid { grid-template-columns: 1fr; }
  .dashboard-date-filter { grid-template-columns: 1fr; }
  .dashboard-date-filter .button { grid-column: auto; }
  .mobile-card-table td { padding-left: 92px; }
  .mobile-card-table td::before { width: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar-backdrop { transition: none; }
}
