/* 广告收入查询平台 · 科技风（PHP 版） */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #05080f;
  --panel: rgba(10, 19, 33, .78);
  --panel2: rgba(16, 30, 50, .9);
  --line: rgba(45, 212, 238, .18);
  --line-strong: rgba(45, 212, 238, .42);
  --text: #d8f2ff;
  --muted: #6b89a8;
  --blue: #06b6d4;
  --blue2: #22d3ee;
  --green: #00d68f;
  --danger: #ff4d6d;
  --gold: #4fe3c1;
  --purple: #8b5cf6;
  --glow: 0 0 18px rgba(34, 211, 238, .28);
  --mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  padding: 24px 32px 48px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 科技网格 + 顶部/底部光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(34, 211, 238, .16), transparent 70%),
    radial-gradient(800px 460px at 88% 4%, rgba(139, 92, 246, .14), transparent 72%),
    linear-gradient(rgba(34, 211, 238, .045) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgba(34, 211, 238, .045) 1px, transparent 1px) 0 0 / 34px 100%,
    var(--bg);
  pointer-events: none;
}
/* 顶部扫描光带 */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 50;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .9), rgba(139, 92, 246, .9), transparent);
  opacity: .85;
  pointer-events: none;
}

a { color: var(--blue2); text-decoration: none; }

.page-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 26px; font-weight: 800; margin-bottom: 6px;
  letter-spacing: .5px;
  background: linear-gradient(92deg, #ffffff 10%, #67e8f9 55%, #a78bfa 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, .35));
}
.page-title .yen { font-size: 24px; -webkit-text-fill-color: #22d3ee; }
.page-sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; line-height: 1.6; }
.top-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(9, 20, 34, .8);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px; color: var(--muted);
  white-space: nowrap;
  box-shadow: inset 0 0 18px rgba(34, 211, 238, .07);
  position: relative;
}
.user-chip::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 8px; height: 8px;
  border-top: 1px solid var(--blue2); border-left: 1px solid var(--blue2);
}
.user-chip b { color: #67e8f9; font-weight: 600; font-family: var(--mono); letter-spacing: .5px; }

/* 面板：玻璃 + 切角科技边框 */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.card::before {
  content: "";
  position: absolute; left: 14px; right: 14px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .7), transparent);
  opacity: .8;
}

.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 20px; margin-bottom: 16px; }
.field label {
  display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px;
  letter-spacing: 1.4px; text-transform: uppercase;
}
.field select, .field input, .field textarea {
  width: 100%;
  background: rgba(4, 12, 22, .9);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: .18s;
}
.field select:focus, .field input:focus, .field textarea:focus {
  border-color: var(--blue2);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .35), 0 0 16px rgba(34, 211, 238, .22);
  background: rgba(6, 20, 34, .95);
}
.field select option { background: #071322; color: var(--text); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 浏览器自动填充时不要变成白底 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--text) !important;
  -webkit-box-shadow: 0 0 0 1000px #06121f inset !important;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

/* 按钮：斜切角 + 霓虹边 */
.btn {
  border: 1px solid var(--line-strong);
  background: rgba(12, 28, 46, .85);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13px;
  cursor: pointer;
  transition: .18s;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: .4px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn:hover {
  border-color: var(--blue2);
  color: #eaffff;
  box-shadow: 0 0 16px rgba(34, 211, 238, .28);
  background: rgba(18, 42, 64, .95);
}
.btn.primary {
  background: linear-gradient(135deg, #0891b2, #0e7490 60%, #0891b2);
  border-color: rgba(103, 232, 249, .8);
  color: #eaffff;
  box-shadow: 0 0 18px rgba(34, 211, 238, .32);
  font-weight: 600;
}
.btn.primary:hover { background: linear-gradient(135deg, #06b6d4, #0e7490); box-shadow: 0 0 26px rgba(34, 211, 238, .55); }
.btn.success {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: rgba(0, 214, 143, .85);
  color: #eafff8;
  box-shadow: 0 0 18px rgba(0, 214, 143, .28);
  font-weight: 600;
}
.btn.success:hover { box-shadow: 0 0 26px rgba(0, 214, 143, .5); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.btn.danger { color: #ffb3c1; border-color: rgba(255, 77, 109, .55); }
.btn.danger:hover { border-color: #ff4d6d; box-shadow: 0 0 16px rgba(255, 77, 109, .3); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* 概览数字 */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sum-item { padding: 6px 4px; position: relative; }
.sum-item .k { color: var(--muted); font-size: 11px; margin-bottom: 10px; letter-spacing: 1.4px; text-transform: uppercase; }
.sum-item .v { font-size: 28px; font-weight: 700; font-family: var(--mono); color: #a5f3ff; text-shadow: 0 0 18px rgba(34, 211, 238, .35); }
.sum-item .v.gold { color: var(--gold); text-shadow: 0 0 20px rgba(79, 227, 193, .45); }

.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chart-head h3 { font-size: 14px; font-weight: 700; letter-spacing: .6px; color: #cbf6ff; position: relative; padding-left: 12px; }
.chart-head h3::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 14px;
  background: linear-gradient(180deg, #22d3ee, #8b5cf6);
  box-shadow: 0 0 10px rgba(34, 211, 238, .7);
}
.chart-head .hint { font-size: 12px; color: var(--muted); }
#curve { width: 100%; height: 320px; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
thead th {
  background: rgba(34, 211, 238, .07);
  color: #9fe8ff;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
  letter-spacing: 1px;
  text-transform: uppercase;
}
tbody td {
  padding: 13px 14px;
  font-size: 13px;
  color: #b6d4e6;
  border-bottom: 1px solid rgba(45, 212, 238, .1);
  white-space: nowrap;
}
tbody tr { transition: .15s; }
tbody tr:hover td { background: rgba(34, 211, 238, .06); color: #e7fbff; }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--blue2); }
td.money { color: var(--gold); font-weight: 600; font-family: var(--mono); }
.empty-row td { text-align: center; color: var(--muted); padding: 40px 0; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* 登录 / 初始化页 */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: -24px -32px -48px; }
.auth-card {
  position: relative;
  width: 400px;
  background: rgba(7, 17, 30, .92);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 36px 32px 30px;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .08), 0 24px 70px rgba(0, 0, 0, .6), 0 0 46px rgba(34, 211, 238, .12);
  backdrop-filter: blur(8px);
}
/* 四角科技装饰 */
.auth-card::before, .auth-card::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
}
.auth-card::before { left: -1px; top: -1px; border-top: 2px solid var(--blue2); border-left: 2px solid var(--blue2); box-shadow: -1px -1px 12px rgba(34, 211, 238, .5); }
.auth-card::after { right: -1px; bottom: -1px; border-bottom: 2px solid var(--purple); border-right: 2px solid var(--purple); box-shadow: 1px 1px 12px rgba(139, 92, 246, .5); }
.auth-card h2 {
  font-size: 21px; text-align: center; margin-bottom: 8px; letter-spacing: 2px;
  background: linear-gradient(92deg, #ffffff, #67e8f9 60%, #a78bfa);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, .3));
}
.auth-card .sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 26px; letter-spacing: .5px; }
.auth-card label { display: block; font-size: 11px; color: var(--muted); margin: 0 0 6px; letter-spacing: 1.4px; text-transform: uppercase; }
.auth-card input {
  width: 100%;
  background: rgba(3, 10, 20, .95);
  border: 1px solid var(--line);
  color: #d8f2ff;
  border-radius: 6px;
  padding: 13px 14px;
  font-size: 15px;
  letter-spacing: 2px;
  outline: none;
  margin-bottom: 16px;
  font-family: var(--mono);
  transition: .18s;
}
.auth-card input:focus {
  border-color: var(--blue2);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .4), 0 0 20px rgba(34, 211, 238, .28);
  background: rgba(6, 22, 36, .98);
}
.auth-card .btn { width: 100%; padding: 13px; font-size: 15px; margin-top: 4px; letter-spacing: 2px; }
.auth-links { text-align: center; margin-top: 18px; font-size: 12px; color: var(--muted); }

/* 提示条 */
.toast {
  position: fixed; top: 26px; left: 50%; transform: translateX(-50%);
  padding: 11px 22px; border-radius: 6px; font-size: 13px;
  background: rgba(4, 32, 24, .95); border: 1px solid rgba(0, 214, 143, .6); color: #a7ffe0;
  box-shadow: 0 0 24px rgba(0, 214, 143, .3);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 999;
  max-width: 76vw; line-height: 1.5;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(4px); }
.toast.err { background: rgba(38, 8, 16, .96); border-color: rgba(255, 77, 109, .7); color: #ffd0d8; box-shadow: 0 0 24px rgba(255, 77, 109, .3); }

.hide { display: none !important; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.code-cell { font-family: var(--mono); font-size: 14px; color: #67e8f9; letter-spacing: 1.5px; text-shadow: 0 0 10px rgba(34, 211, 238, .4); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 4px; font-size: 11px; letter-spacing: .5px; }
.badge.on { background: rgba(0, 214, 143, .12); color: #5effc0; border: 1px solid rgba(0, 214, 143, .5); }
.badge.off { background: rgba(255, 77, 109, .12); color: #ffa8b8; border: 1px solid rgba(255, 77, 109, .5); }
.hint-line { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.7; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(2, 5, 10, .82);
  display: flex; align-items: center; justify-content: center; z-index: 40;
  backdrop-filter: blur(3px);
}
.modal-mask.hide { display: none; }
.modal {
  width: 520px; max-width: calc(100vw - 40px); max-height: 80vh;
  background: rgba(8, 18, 31, .97);
  border: 1px solid var(--line-strong); border-radius: 8px;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .1), 0 24px 60px rgba(0, 0, 0, .65), 0 0 40px rgba(34, 211, 238, .14);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 14px; letter-spacing: 1px; color: #cbf6ff; }
.modal-body { padding: 12px 20px; overflow: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.chk {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  margin-bottom: 8px; cursor: pointer; transition: .15s;
  background: rgba(4, 14, 25, .6);
}
.chk:hover { border-color: var(--blue2); box-shadow: 0 0 14px rgba(34, 211, 238, .2); }
.chk input { width: 16px; height: 16px; accent-color: #22d3ee; }
.chk span { font-size: 13px; }
.chk em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 12px; font-family: var(--mono); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #060d17; }
::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, .28); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, .5); }

@media (max-width: 980px) {
  body { padding: 16px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .summary, .grid2 { grid-template-columns: 1fr; }
  .top-bar { flex-direction: column; }
  .auth-card { width: 100%; }
  .auth-page { margin: -16px -16px -24px; }
}

/* ================= 管理端新布局：侧栏 + KPI + 游戏卡片 ================= */
.app-body { padding: 0 !important; }
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: 0 0 236px; height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; padding: 18px 14px;
  background: linear-gradient(180deg, rgba(9,16,28,.96), rgba(6,11,20,.98));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 22px; font-weight: 800; font-size: 15px; letter-spacing: .4px; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue2); box-shadow: 0 0 12px var(--blue2); }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: #9fc4de; font-size: 14px; cursor: pointer; border: 1px solid transparent; transition: .18s; }
.nav-item i { font-style: normal; opacity: .8; }
.nav-item:hover { background: rgba(34,211,238,.08); color: var(--text); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(92deg, rgba(34,211,238,.22), rgba(139,92,246,.14));
  border-color: rgba(34,211,238,.38);
  box-shadow: inset 0 0 18px rgba(34,211,238,.12);
}
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.main { flex: 1; min-width: 0; padding: 26px 30px 70px; }
.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.view-head h1 {
  font-size: 24px; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(92deg, #ffffff 10%, #67e8f9 60%, #a78bfa 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(34,211,238,.3));
}
.view-sub { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.6; }
.date-chip { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(10,19,33,.75); color: #9fc4de; font-size: 12.5px; white-space: nowrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  position: relative; padding: 16px 18px 14px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(14,26,43,.95), rgba(9,16,28,.92));
  border: 1px solid var(--line);
}
.kpi::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,.65), transparent); }
.kpi-ico { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-bottom: 10px; border: 1px solid; }
.ico-games { color: #c4b5fd; background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.4); }
.ico-events { color: #67e8f9; background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.38); }
.ico-income { color: #4fe3c1; background: rgba(79,227,193,.12); border-color: rgba(79,227,193,.38); }
.ico-today { color: #fbbf24; background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35); }
.kpi-val { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.kpi-val.gold { color: var(--gold); text-shadow: 0 0 16px rgba(79,227,193,.35); }
.kpi-label { margin-top: 4px; color: var(--muted); font-size: 12.5px; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 24px 0 14px; }
.section-head h2 { font-size: 17px; font-weight: 700; }

.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.game-card {
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(15,26,44,.9), rgba(9,15,26,.92));
  border: 1px solid rgba(45,212,238,.16);
  transition: .2s;
}
.game-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.gc-head { display: flex; align-items: center; gap: 9px; }
.gc-ico { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: linear-gradient(135deg, rgba(34,211,238,.3), rgba(139,92,246,.28)); }
.gc-name { flex: 1; font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.on { color: #4fe3c1; background: rgba(79,227,193,.12); border: 1px solid rgba(79,227,193,.38); }
.badge.off { color: #8095ab; background: rgba(128,149,171,.12); border: 1px solid rgba(128,149,171,.3); }
.gc-id { margin: 10px 0 12px; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.gc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 10px; border-top: 1px dashed rgba(45,212,238,.16); }
.gc-stats b { display: block; font-size: 15px; font-weight: 700; }
.gc-stats span { color: var(--muted); font-size: 11.5px; }
.gc-foot { margin-top: 10px; color: var(--muted); font-size: 11.5px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; backdrop-filter: blur(6px); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.copy-row { display: flex; gap: 10px; align-items: center; }
.copy-row code { flex: 1; padding: 10px 12px; border-radius: 8px; background: rgba(6,12,20,.85); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: #9be9f7; overflow-x: auto; white-space: nowrap; }
.hook-state { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.textarea { width: 100%; height: 120px; background: rgba(14,22,38,.9); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px; font-size: 13px; outline: none; resize: vertical; font-family: inherit; }
.code-pill { display: inline-block; padding: 3px 9px; border-radius: 7px; background: rgba(34,211,238,.12); border: 1px solid rgba(34,211,238,.3); font-family: var(--mono); cursor: pointer; letter-spacing: 1px; }
.code-pill:hover { background: rgba(34,211,238,.22); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.empty-box { grid-column: 1 / -1; padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; }
.pick input { accent-color: #22d3ee; }
.pick span { flex: 1; }
.pick i { font-style: normal; color: var(--muted); font-size: 12px; font-family: var(--mono); }

@media (max-width: 1280px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { flex-direction: row; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 20px 16px 50px; }
}
/* ---- 用户端视图切换 ---- */
.tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.tabs .tab {
  padding: 9px 22px; border-radius: 10px; cursor: pointer;
  background: rgba(15, 40, 62, .55);
  border: 1px solid rgba(34, 211, 238, .22);
  color: #8fb4cc; font-size: 14px; font-family: inherit; letter-spacing: .5px;
  transition: all .18s ease;
}
.tabs .tab:hover { color: #d8f2ff; border-color: rgba(34, 211, 238, .5); }
.tabs .tab.active {
  color: #061220; font-weight: 600;
  background: linear-gradient(135deg, #22d3ee, #38bdf8);
  border-color: #22d3ee;
  box-shadow: 0 0 16px rgba(34, 211, 238, .45);
}
#pane-detail .hint, .hint { font-size: 12px; color: var(--muted); line-height: 1.7; }
#d-tbody td.money { color: #f5c84b; }
/* ---- 数据总览 7 宫格 ---- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.metric {
  background: linear-gradient(160deg, rgba(16, 46, 70, .75), rgba(10, 26, 42, .55));
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 12px;
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
}
.metric::after {
  content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, #22d3ee, rgba(34, 211, 238, 0));
}
.metric .k { font-size: 12px; color: #7fa3ba; letter-spacing: .5px; margin-bottom: 8px; }
.metric .v { font-size: 26px; font-weight: 600; color: #d8f2ff; font-variant-numeric: tabular-nums; line-height: 1.2; }
.metric .v.gold { color: #f5c84b; text-shadow: 0 0 12px rgba(245, 200, 75, .35); }
@media (max-width: 1100px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .metrics { grid-template-columns: 1fr; } }
/* ---- KPI 副标注（今日主值 + 昨日对照） ---- */
.kpi-sub { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); letter-spacing: .3px; font-weight: 400; }
/* ---- 登录页：自助生成授权码 ---- */
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(34,211,238,0), rgba(34,211,238,.35), rgba(34,211,238,0)); }
.auth-tip { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
/* ---- 「用户自助」徽章 ---- */
.badge.self { background: rgba(245, 200, 75, .14); color: #f5c84b; border: 1px solid rgba(245, 200, 75, .4); }
/* ---- 用户端顶部公告 ---- */
#notice-bar { margin-bottom: 14px; }
.notice-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #22d3ee; letter-spacing: 1px; margin-bottom: 8px; }
.notice-head .dot { width: 7px; height: 7px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 10px #22d3ee; }
.notice-item {
  background: linear-gradient(120deg, rgba(16, 46, 70, .8), rgba(10, 26, 42, .6));
  border: 1px solid rgba(34, 211, 238, .2);
  border-left: 3px solid #22d3ee;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.notice-item.important {
  border-color: rgba(245, 200, 75, .35);
  border-left-color: #f5c84b;
  background: linear-gradient(120deg, rgba(60, 45, 12, .55), rgba(20, 24, 34, .6));
}
.notice-item .nt-title { font-size: 14px; color: #e6f6ff; font-weight: 600; margin-bottom: 4px; }
.notice-item.important .nt-title { color: #f5c84b; }
.notice-item .nt-body { font-size: 13px; color: #9fc0d4; line-height: 1.7; white-space: pre-wrap; }
.notice-item .nt-time { font-size: 11px; color: #6f8fa4; margin-top: 6px; }


/* ================= 主题切换（深色默认 / 浅色可选） ================= */
.theme-btn { font-size: 12px; padding: 8px 14px; letter-spacing: .4px; }

/* 授权码隐藏按钮（用户端左上角） */
.code-eye {
  border: none; background: transparent; cursor: pointer;
  font-size: 11px; line-height: 1; padding: 0 0 0 8px; margin-left: 2px;
  color: var(--muted); opacity: .85; transition: .15s; font-family: inherit;
  border-left: 1px solid rgba(45, 212, 238, .3);
}
.code-eye:hover { opacity: 1; color: var(--blue2); border-left-color: var(--blue2); }

/* ---------- 浅色（雾蓝科技风） ---------- */
body.light {
  --bg: #eef3f9;
  --panel: rgba(255, 255, 255, .84);
  --panel2: rgba(255, 255, 255, .96);
  --line: rgba(8, 145, 178, .22);
  --line-strong: rgba(8, 145, 178, .46);
  --text: #10283a;
  --muted: #5d7c8f;
  --blue: #0e7490;
  --blue2: #0891b2;
  --green: #059669;
  --danger: #dc2626;
  --gold: #0f766e;
  --purple: #7c3aed;
  --glow: 0 0 14px rgba(8, 145, 178, .18);
}
body.light::before {
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(8, 145, 178, .13), transparent 70%),
    radial-gradient(800px 460px at 88% 4%, rgba(124, 58, 237, .10), transparent 72%),
    linear-gradient(rgba(8, 145, 178, .07) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgba(8, 145, 178, .07) 1px, transparent 1px) 0 0 / 34px 100%,
    var(--bg);
}
body.light::after {
  background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .8), rgba(124, 58, 237, .7), transparent);
  opacity: .65;
}
body.light .page-title,
body.light .view-head h1,
body.light .auth-card h2 {
  background: linear-gradient(92deg, #0b2434 10%, #0e7490 55%, #6d28d9 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: none;
}
body.light .page-title .yen, body.light .auth-card h2 .yen { -webkit-text-fill-color: #0891b2; }

body.light .user-chip {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(8, 145, 178, .28);
  box-shadow: 0 2px 10px rgba(15, 43, 61, .06);
}
body.light .user-chip b { color: #0e7490; }
body.light .user-chip::before { border-color: currentColor; color: #0891b2; }

body.light .card {
  box-shadow: 0 8px 26px rgba(15, 43, 61, .07), inset 0 1px 0 #fff;
}
body.light .card::before { background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .45), transparent); }

body.light .field select,
body.light .field input,
body.light .field textarea,
body.light .textarea,
body.light .auth-card input {
  background: #fff;
  border-color: rgba(8, 145, 178, .26);
  color: var(--text);
}
body.light .field select:focus,
body.light .field input:focus,
body.light .field textarea:focus,
body.light .auth-card input:focus {
  background: #fff;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, .14);
}
body.light .field select option { background: #fff; color: var(--text); }
body.light input:-webkit-autofill,
body.light input:-webkit-autofill:hover,
body.light input:-webkit-autofill:focus,
body.light textarea:-webkit-autofill,
body.light select:-webkit-autofill {
  -webkit-text-fill-color: var(--text) !important;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  caret-color: var(--text);
}

body.light .btn {
  background: #fff;
  border-color: rgba(8, 145, 178, .38);
  color: var(--text);
}
body.light .btn:hover {
  background: #f2fbfe;
  border-color: #0891b2;
  color: #0b4a5c;
  box-shadow: 0 3px 12px rgba(8, 145, 178, .18);
}
body.light .btn.primary { background: linear-gradient(135deg, #0891b2, #0e7490 60%, #0891b2); color: #fff; }
body.light .btn.primary:hover { background: linear-gradient(135deg, #06b6d4, #0e7490); }
body.light .btn.success { background: linear-gradient(135deg, #059669, #047857); color: #fff; }
body.light .btn.danger { color: #b91c1c; border-color: rgba(220, 38, 38, .5); }
body.light .btn.danger:hover { background: #fff5f5; border-color: #dc2626; color: #991b1b; box-shadow: 0 3px 12px rgba(220, 38, 38, .15); }
body.light .btn.ghost { background: transparent; }
body.light .btn.ghost:hover { background: #f2fbfe; }

body.light .sum-item .v { color: #0e7490; text-shadow: none; }
body.light .sum-item .v.gold { color: #0f766e; text-shadow: none; }
body.light .chart-head h3 { color: #0e3b52; }
body.light .chart-head .hint { color: var(--muted); }
body.light .metric {
  background: linear-gradient(160deg, #ffffff, #f6fbfe);
  border-color: rgba(8, 145, 178, .2);
}
body.light .metric .k { color: #5d7c8f; }
body.light .metric .v { color: #10283a; }
body.light .metric .v.gold { color: #b45309; text-shadow: none; }

body.light thead th {
  background: rgba(8, 145, 178, .08);
  color: #0e5c72;
  border-bottom-color: rgba(8, 145, 178, .35);
}
body.light tbody td { color: #2b4a5e; border-bottom-color: rgba(8, 145, 178, .12); }
body.light tbody tr:hover td { background: rgba(8, 145, 178, .07); color: #0b2233; }
body.light tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 #0891b2; }
body.light td.money, body.light #d-tbody td.money { color: #b8780a; }
body.light .code-cell { color: #0e7490; text-shadow: none; }
body.light .empty-row td { color: #6b8798; }

body.light .badge.on { background: rgba(5, 150, 105, .12); color: #047857; border-color: rgba(5, 150, 105, .45); }
body.light .badge.off { background: rgba(100, 116, 139, .12); color: #556070; border-color: rgba(100, 116, 139, .35); }
body.light .badge.self { background: rgba(245, 158, 11, .14); color: #a16207; border-color: rgba(245, 158, 11, .45); }

body.light .auth-card {
  background: rgba(255, 255, 255, .95);
  border-color: rgba(8, 145, 178, .45);
  box-shadow: 0 0 0 1px rgba(8, 145, 178, .06), 0 20px 50px rgba(15, 43, 61, .14);
}
body.light .auth-card .sub { color: var(--muted); }
body.light .auth-divider::before, body.light .auth-divider::after {
  background: linear-gradient(90deg, rgba(8, 145, 178, 0), rgba(8, 145, 178, .35), rgba(8, 145, 178, 0));
}

body.light .toast {
  background: #ecfdf5; border-color: rgba(5, 150, 105, .6); color: #065f46;
  box-shadow: 0 8px 24px rgba(5, 150, 105, .18);
}
body.light .toast.err {
  background: #fef2f2; border-color: rgba(220, 38, 38, .6); color: #991b1b;
  box-shadow: 0 8px 24px rgba(220, 38, 38, .16);
}

body.light .modal-mask { background: rgba(15, 43, 61, .45); }
body.light .modal {
  background: #fff;
  border-color: rgba(8, 145, 178, .4);
  box-shadow: 0 20px 50px rgba(15, 43, 61, .18);
}
body.light .modal-head h3 { color: #0e3b52; }
body.light .chk { background: #f7fbfd; }
body.light .chk:hover { background: #fff; box-shadow: 0 0 0 2px rgba(8, 145, 178, .12); }

body.light ::-webkit-scrollbar-track { background: #e6eef5; }
body.light ::-webkit-scrollbar-thumb { background: rgba(8, 145, 178, .3); }
body.light ::-webkit-scrollbar-thumb:hover { background: rgba(8, 145, 178, .55); }

/* 管理端侧栏 / 导航 */
body.light .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(240, 246, 251, .98));
  border-right-color: rgba(8, 145, 178, .22);
  box-shadow: 2px 0 18px rgba(15, 43, 61, .05);
}
body.light .nav-item { color: #35637a; }
body.light .nav-item:hover { background: rgba(8, 145, 178, .09); color: #0b2233; }
body.light .nav-item.active {
  color: #0b2233;
  background: linear-gradient(92deg, rgba(8, 145, 178, .16), rgba(124, 58, 237, .1));
  border-color: rgba(8, 145, 178, .35);
  box-shadow: inset 0 0 12px rgba(8, 145, 178, .08);
}
body.light .date-chip { background: #fff; color: #35637a; border-color: rgba(8, 145, 178, .26); }
body.light .kpi {
  background: linear-gradient(160deg, #ffffff, #f5fafd);
  border-color: rgba(8, 145, 178, .2);
}
body.light .kpi::before { background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .5), transparent); }
body.light .kpi-val.gold { color: #0f766e; text-shadow: none; }
body.light .ico-games { color: #6d28d9; background: rgba(124, 58, 237, .1); border-color: rgba(124, 58, 237, .35); }
body.light .ico-events { color: #0e7490; background: rgba(8, 145, 178, .1); border-color: rgba(8, 145, 178, .35); }
body.light .ico-income { color: #0f766e; background: rgba(15, 118, 110, .1); border-color: rgba(15, 118, 110, .35); }
body.light .ico-today { color: #b45309; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .38); }
body.light .game-card {
  background: linear-gradient(160deg, #ffffff, #f7fbfe);
  border-color: rgba(8, 145, 178, .18);
}
body.light .game-card:hover { box-shadow: 0 10px 26px rgba(15, 43, 61, .1); }
body.light .gc-stats { border-top-color: rgba(8, 145, 178, .2); }
body.light .copy-row code { background: #f3f9fc; color: #0e5c72; border-color: rgba(8, 145, 178, .22); }
body.light .code-pill { background: rgba(8, 145, 178, .1); border-color: rgba(8, 145, 178, .3); }
body.light .code-pill:hover { background: rgba(8, 145, 178, .18); }

/* 用户端标签页 */
body.light .tabs .tab {
  background: rgba(255, 255, 255, .75);
  border-color: rgba(8, 145, 178, .25);
  color: #35637a;
}
body.light .tabs .tab:hover { color: #0b2233; border-color: rgba(8, 145, 178, .5); }
body.light .tabs .tab.active { color: #062b38; background: linear-gradient(135deg, #22d3ee, #38bdf8); border-color: #22d3ee; }

/* 公告 */
body.light .notice-item {
  background: linear-gradient(120deg, #ffffff, #f4fafd);
  border-color: rgba(8, 145, 178, .25);
  border-left-color: #0891b2;
}
body.light .notice-item.important {
  background: linear-gradient(120deg, #fffdf3, #fff9e6);
  border-color: rgba(234, 179, 8, .45);
  border-left-color: #d97706;
}
body.light .notice-item .nt-title { color: #0e3b52; }
body.light .notice-item.important .nt-title { color: #b45309; }
body.light .notice-item .nt-body { color: #3d6076; }
body.light .notice-item .nt-time { color: #7893a4; }
body.light .notice-head { color: #0e7490; }
body.light .notice-head .dot { background: #0891b2; box-shadow: 0 0 8px #0891b2; }
body.light .code-eye { border-left-color: rgba(8, 145, 178, .35); }

/* ==================== 大屏数据（screen.js 专用样式） ====================
   大屏固定深色科技风，不随 body.light 主题变化 */
#pane-screen { margin: 0 -32px 0; }

.bs {
  position: relative;
  padding: 16px 24px 26px;
  border-radius: 0;
  background:
    radial-gradient(1000px 420px at 8% -10%, rgba(34, 211, 238, .14), transparent 70%),
    radial-gradient(900px 400px at 92% 0%, rgba(139, 92, 246, .13), transparent 72%),
    linear-gradient(rgba(34, 211, 238, .035) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(34, 211, 238, .035) 1px, transparent 1px) 0 0 / 32px 100%,
    #04070d;
  border: 1px solid rgba(45, 212, 238, .12);
  box-shadow: inset 0 1px 0 rgba(45, 212, 238, .18), 0 0 60px rgba(6, 182, 212, .10);
}

/* 顶部信息条 */
.bs-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.bs-head-l, .bs-head-r { display: flex; align-items: center; gap: 12px; }
.bs-head-r { flex-direction: column; align-items: flex-end; gap: 2px; }
.bs-title {
  font-size: 21px; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(92deg, #ffffff 8%, #67e8f9 52%, #a78bfa 96%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, .4));
}
.bs-sub { font-size: 11px; color: #6b89a8; letter-spacing: 1px; margin-top: 4px; }
.bs-head-c { text-align: center; flex: 1 1 auto; min-width: 0; }
.bs-clock {
  font-family: var(--mono); font-size: 26px; font-weight: 700; color: #d8f2ff;
  letter-spacing: 2px; text-shadow: 0 0 16px rgba(34, 211, 238, .55);
  line-height: 1;
}
.bs-date { font-size: 11px; color: #6b89a8; letter-spacing: 1px; }
.bs-refresh {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; font-size: 12px; cursor: pointer;
  color: #9fe8ff; background: rgba(34, 211, 238, .10);
  border: 1px solid rgba(45, 212, 238, .42); border-radius: 6px;
  font-family: inherit; transition: .15s; letter-spacing: .5px;
}
.bs-refresh:hover { background: rgba(34, 211, 238, .2); color: #fff; box-shadow: 0 0 16px rgba(34, 211, 238, .35); }
.bs-refresh:disabled { opacity: .55; cursor: default; }
.bs-upd { font-size: 11px; color: #6b89a8; letter-spacing: .5px; }
.bs-upd b { color: #7ee7ff; font-weight: 600; font-family: var(--mono); }

/* 三列栅格 */
.bs-grid { display: grid; grid-template-columns: 1.02fr 1.62fr 1.02fr; gap: 14px; }
.bs-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* 面板 */
.bs-panel {
  position: relative; display: flex; flex-direction: column;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(12, 26, 43, .92), rgba(7, 16, 28, .92));
  border: 1px solid rgba(45, 212, 238, .20);
  border-radius: 4px;
}
.bs-panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .75), transparent);
}
/* 四角装饰 */
.bs-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: 4px;
  background:
    linear-gradient(#22d3ee, #22d3ee) left top / 10px 1px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) left top / 1px 10px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) right bottom / 10px 1px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) right bottom / 1px 10px no-repeat;
  opacity: .65;
}
.bs-ph { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-shrink: 0; }
.bs-ph i { width: 3px; height: 14px; background: linear-gradient(#22d3ee, #8b5cf6); border-radius: 1px; flex: none; }
.bs-ph h3 { font-size: 13px; font-weight: 700; color: #bfeaff; letter-spacing: 1px; }
.bs-hint { margin-left: auto; font-size: 11px; color: #6b89a8; font-family: var(--mono); }
.bs-legend { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 11px; color: #7f9fbb; }
.bs-legend em { width: 14px; height: 2px; border-radius: 1px; display: inline-block; margin-right: 2px; }
.bs-legend .l-before { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, .7); }
.bs-legend .l-after { background: #22d3ee; box-shadow: 0 0 8px rgba(34, 211, 238, .7); }
.bs-live { width: 8px; height: 8px; border-radius: 50%; background: #00d68f; margin-left: 6px; box-shadow: 0 0 10px #00d68f; animation: bspulse 1.6s infinite; }
@keyframes bspulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* 画布容器 */
.bs-cv { position: relative; width: 100%; flex: 1 1 auto; min-height: 0; }
.bs-cv canvas { display: block; width: 100%; height: 100%; }
.bs-p7 { height: 226px; }
.bs-p7 .bs-cv { height: 172px; }
.bs-p30 { flex: 1 1 auto; min-height: 340px; }
.bs-p30 .bs-cv { min-height: 300px; }

/* KPI 六格 */
.bs-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bs-kpi {
  position: relative; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(16, 34, 55, .92), rgba(8, 18, 31, .92));
  border: 1px solid rgba(45, 212, 238, .22); border-radius: 4px;
  overflow: hidden;
}
.bs-kpi::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .6), transparent);
}
.bs-kpi .k { font-size: 11px; color: #7f9fbb; letter-spacing: 1px; margin-bottom: 8px; }
.bs-kpi .v { font-size: 23px; font-weight: 800; color: #e8f9ff; font-family: var(--mono); line-height: 1.1; letter-spacing: .5px; }
.bs-kpi .v.acc { color: #4fe3c1; text-shadow: 0 0 18px rgba(79, 227, 193, .45); }
.bs-kpi .n { font-size: 10px; color: #587a95; margin-top: 6px; letter-spacing: .5px; }

/* 排行 */
.bs-rank { display: flex; flex-direction: column; gap: 9px; flex: 1 1 auto; }
.bs-rank-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bs-rank-no {
  width: 20px; height: 20px; flex: none; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
  color: #7f9fbb; background: rgba(34, 211, 238, .1); border: 1px solid rgba(45, 212, 238, .25);
}
.bs-rank-item.top1 .bs-rank-no { color: #0b1a26; background: linear-gradient(135deg, #22d3ee, #67e8f9); border-color: #67e8f9; box-shadow: 0 0 12px rgba(34, 211, 238, .5); }
.bs-rank-item.top2 .bs-rank-no { color: #0b1a26; background: linear-gradient(135deg, #a78bfa, #c4b5fd); border-color: #c4b5fd; }
.bs-rank-item.top3 .bs-rank-no { color: #0b1a26; background: linear-gradient(135deg, #f59e0b, #fcd34d); border-color: #fcd34d; }
.bs-rank-name { font-size: 12px; color: #bfeaff; width: 84px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-rank-bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: rgba(45, 212, 238, .12); overflow: hidden; min-width: 20px; }
.bs-rank-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #8b5cf6, #22d3ee); box-shadow: 0 0 10px rgba(34, 211, 238, .55); }
.bs-rank-val { font-size: 12px; font-family: var(--mono); color: #4fe3c1; width: 62px; text-align: right; flex: none; }
.bs-empty { font-size: 12px; color: #587a95; padding: 18px 0; text-align: center; line-height: 1.8; }

/* 环形图 */
.bs-pie { height: 300px; }
.bs-pie-wrap { display: flex; gap: 10px; flex: 1 1 auto; min-height: 0; align-items: center; }
.bs-donut { width: 46%; flex: none; height: 100%; min-width: 120px; }
.bs-donut-c {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none; width: 78%;
}
.bs-donut-c .dv { font-size: 17px; font-weight: 800; color: #e8f9ff; font-family: var(--mono); letter-spacing: .5px; }
.bs-donut-c .dk { font-size: 10px; color: #6b89a8; margin-top: 3px; letter-spacing: 1px; }
.bs-pie-legend { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.bs-lg-item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #9fc3dc; min-width: 0; }
.bs-lg-item em { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.bs-lg-item span.nm { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-lg-item span.pc { font-family: var(--mono); color: #7ee7ff; flex: none; }

/* 实时滚动 */
.bs-pfeed { flex: 1 1 auto; min-height: 236px; }
.bs-feed { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.bs-feed-head, .bs-feed-row {
  display: grid; grid-template-columns: 92px 1fr 88px 54px 74px;
  gap: 6px; align-items: center;
  font-size: 11px; padding: 5px 0;
}
.bs-feed-head {
  color: #587a95; letter-spacing: 1px; border-bottom: 1px solid rgba(45, 212, 238, .18);
  padding-bottom: 8px; font-size: 10px;
}
.bs-feed-body { overflow: hidden; flex: 1 1 auto; }
.bs-feed-row {
  border-bottom: 1px dashed rgba(45, 212, 238, .09);
  font-family: var(--mono);
}
.bs-feed-row .c-time { color: #7f9fbb; white-space: nowrap; overflow: hidden; }
.bs-feed-row .c-app { color: #bfeaff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-feed-row .c-user { color: #6b89a8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-feed-row .c-ev { color: #a78bfa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-feed-row .c-amt { color: #4fe3c1; text-align: right; white-space: nowrap; }
.bs-feed-row.fresh { animation: bsrow .6s ease-out; }
@keyframes bsrow { from { background: rgba(34, 211, 238, .16); } to { background: transparent; } }

/* 响应式：窄屏 / 手机堆成单列 */
@media (max-width: 1180px) {
  .bs-grid { grid-template-columns: 1fr; }
  .bs-p7 { height: 250px; }
  .bs-p30 { min-height: 320px; }
  .bs-pie { height: auto; }
  .bs-pie-wrap { flex-direction: column; align-items: stretch; }
  .bs-donut { width: 100%; height: 190px; }
  .bs-donut-c { width: 60%; }
  .bs-pie-legend { flex-direction: row; flex-wrap: wrap; }
  .bs-lg-item { width: calc(50% - 5px); }
}
@media (max-width: 980px) {
  #pane-screen { margin: 0 -16px 0; }
  .bs { padding: 14px 14px 20px; }
}

@media (max-width: 760px) {
  #pane-screen { margin: 0 -16px 0; }
  .bs-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .bs-head-c { order: -1; text-align: left; }
  .bs-head-l { flex-wrap: wrap; gap: 8px; }
  .bs-head-r { flex-direction: row; align-items: center; justify-content: space-between; }
  .bs { padding: 12px; }
  .bs-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bs-kpi .v { font-size: 17px; }
  .bs-clock { font-size: 18px; }
  .bs-title { font-size: 16px; letter-spacing: 1px; }
  .bs-head { gap: 8px; }
  .bs-feed-head, .bs-feed-row { grid-template-columns: 74px 1fr 58px 46px 62px; font-size: 10px; }
  .bs-lg-item { width: 100%; }
}

/* 排行面板按内容撑开，避免底部大片留白 */
.bs-prank { flex: 0 0 auto; }
.bs-prank .bs-rank { flex: 0 0 auto; }
.bs-prank .bs-rank-item { padding: 5px 0; }
.bs-prank .bs-rank-name { font-size: 12.5px; }

/* ==================== 大屏浅色主题（跟随 body.light） ==================== */
body.light .bs {
  background:
    radial-gradient(1000px 420px at 8% -10%, rgba(8, 145, 178, .16), transparent 70%),
    radial-gradient(900px 400px at 92% 0%, rgba(124, 58, 237, .10), transparent 72%),
    linear-gradient(rgba(8, 145, 178, .05) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(8, 145, 178, .05) 1px, transparent 1px) 0 0 / 32px 100%,
    #eef3f9;
  border-color: rgba(8, 145, 178, .20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 40px rgba(8, 145, 178, .10);
}
body.light .bs-title {
  background: linear-gradient(92deg, #0b2a3d 8%, #0e7490 52%, #6d28d9 96%);
  -webkit-background-clip: text; background-clip: text;
  filter: none;
}
body.light .bs-sub,
body.light .bs-date,
body.light .bs-upd,
body.light .bs-hint { color: #5d7c8f; }
body.light .bs-upd b { color: #0e7490; }
body.light .bs-clock { color: #0b2a3d; text-shadow: 0 0 14px rgba(8, 145, 178, .28); }
body.light .bs-refresh {
  color: #0e7490; background: #ffffff;
  border-color: rgba(8, 145, 178, .40);
}
body.light .bs-refresh:hover { background: #e0f4fb; color: #08506b; box-shadow: 0 0 14px rgba(8, 145, 178, .22); }
body.light .bs-panel {
  background: linear-gradient(180deg, #ffffff, #f7fbfe);
  border-color: rgba(8, 145, 178, .22);
  box-shadow: 0 6px 18px rgba(15, 40, 58, .06);
}
body.light .bs-panel::before { background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .55), transparent); }
body.light .bs-ph h3 { color: #0e3b52; }
body.light .bs-legend { color: #5d7c8f; }
body.light .bs-kpi {
  background: #ffffff;
  border-color: rgba(8, 145, 178, .22);
  box-shadow: 0 6px 16px rgba(15, 40, 58, .06);
}
body.light .bs-kpi::after { background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .50), transparent); }
body.light .bs-kpi .k { color: #5d7c8f; }
body.light .bs-kpi .v { color: #10283a; }
body.light .bs-kpi .v.acc { color: #0f766e; text-shadow: none; }
body.light .bs-kpi .n { color: #6b8798; }
body.light .bs-rank-no {
  color: #5d7c8f; background: rgba(8, 145, 178, .08);
  border-color: rgba(8, 145, 178, .25);
}
body.light .bs-rank-item.top1 .bs-rank-no {
  color: #083344; background: linear-gradient(135deg, #22d3ee, #67e8f9);
  border-color: #22d3ee; box-shadow: 0 0 10px rgba(8, 145, 178, .30);
}
body.light .bs-rank-item.top2 .bs-rank-no {
  color: #2e1065; background: linear-gradient(135deg, #a78bfa, #ddd6fe); border-color: #a78bfa;
}
body.light .bs-rank-item.top3 .bs-rank-no {
  color: #78350f; background: linear-gradient(135deg, #fbbf24, #fde68a); border-color: #fbbf24;
}
body.light .bs-rank-name { color: #0e3b52; }
body.light .bs-rank-bar { background: rgba(8, 145, 178, .12); }
body.light .bs-rank-val { color: #0f766e; }
body.light .bs-empty { color: #6b8798; }
body.light .bs-donut-c .dv { color: #10283a; }
body.light .bs-donut-c .dk { color: #6b8798; }
body.light .bs-lg-item { color: #33566b; }
body.light .bs-lg-item span.pc { color: #0e7490; }
body.light .bs-feed-head { color: #6b8798; border-bottom-color: rgba(8, 145, 178, .18); }
body.light .bs-feed-row { border-bottom-color: rgba(8, 145, 178, .10); }
body.light .bs-feed-row .c-time { color: #5d7c8f; }
body.light .bs-feed-row .c-app { color: #0e3b52; }
body.light .bs-feed-row .c-user { color: #6b8798; }
body.light .bs-feed-row .c-ev { color: #6d28d9; }
body.light .bs-feed-row .c-amt { color: #0f766e; }
body.light .bs-feed-row.fresh { animation: bsrowl .6s ease-out; }
@keyframes bsrowl { from { background: rgba(8, 145, 178, .12); } to { background: transparent; } }

/* ==================== 大屏数据（screen.js 专用样式） ====================
   大屏固定深色科技风，不随 body.light 主题变化 */
#pane-screen { margin: 0 -32px 0; }

.bs {
  position: relative;
  padding: 16px 24px 26px;
  border-radius: 0;
  background:
    radial-gradient(1000px 420px at 8% -10%, rgba(34, 211, 238, .14), transparent 70%),
    radial-gradient(900px 400px at 92% 0%, rgba(139, 92, 246, .13), transparent 72%),
    linear-gradient(rgba(34, 211, 238, .035) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(34, 211, 238, .035) 1px, transparent 1px) 0 0 / 32px 100%,
    #04070d;
  border: 1px solid rgba(45, 212, 238, .12);
  box-shadow: inset 0 1px 0 rgba(45, 212, 238, .18), 0 0 60px rgba(6, 182, 212, .10);
}

/* 顶部信息条 */
.bs-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.bs-head-l, .bs-head-r { display: flex; align-items: center; gap: 12px; }
.bs-head-r { flex-direction: column; align-items: flex-end; gap: 2px; }
.bs-title {
  font-size: 21px; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(92deg, #ffffff 8%, #67e8f9 52%, #a78bfa 96%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, .4));
}
.bs-sub { font-size: 11px; color: #6b89a8; letter-spacing: 1px; margin-top: 4px; }
.bs-head-c { text-align: center; flex: 1 1 auto; min-width: 0; }
.bs-clock {
  font-family: var(--mono); font-size: 26px; font-weight: 700; color: #d8f2ff;
  letter-spacing: 2px; text-shadow: 0 0 16px rgba(34, 211, 238, .55);
  line-height: 1;
}
.bs-date { font-size: 11px; color: #6b89a8; letter-spacing: 1px; }
.bs-refresh {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; font-size: 12px; cursor: pointer;
  color: #9fe8ff; background: rgba(34, 211, 238, .10);
  border: 1px solid rgba(45, 212, 238, .42); border-radius: 6px;
  font-family: inherit; transition: .15s; letter-spacing: .5px;
}
.bs-refresh:hover { background: rgba(34, 211, 238, .2); color: #fff; box-shadow: 0 0 16px rgba(34, 211, 238, .35); }
.bs-refresh:disabled { opacity: .55; cursor: default; }
.bs-upd { font-size: 11px; color: #6b89a8; letter-spacing: .5px; }
.bs-upd b { color: #7ee7ff; font-weight: 600; font-family: var(--mono); }

/* 三列栅格 */
.bs-grid { display: grid; grid-template-columns: 1.02fr 1.62fr 1.02fr; gap: 14px; }
.bs-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* 面板 */
.bs-panel {
  position: relative; display: flex; flex-direction: column;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(12, 26, 43, .92), rgba(7, 16, 28, .92));
  border: 1px solid rgba(45, 212, 238, .20);
  border-radius: 4px;
}
.bs-panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .75), transparent);
}
/* 四角装饰 */
.bs-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: 4px;
  background:
    linear-gradient(#22d3ee, #22d3ee) left top / 10px 1px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) left top / 1px 10px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) right bottom / 10px 1px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) right bottom / 1px 10px no-repeat;
  opacity: .65;
}
.bs-ph { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-shrink: 0; }
.bs-ph i { width: 3px; height: 14px; background: linear-gradient(#22d3ee, #8b5cf6); border-radius: 1px; flex: none; }
.bs-ph h3 { font-size: 13px; font-weight: 700; color: #bfeaff; letter-spacing: 1px; }
.bs-hint { margin-left: auto; font-size: 11px; color: #6b89a8; font-family: var(--mono); }
.bs-legend { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 11px; color: #7f9fbb; }
.bs-legend em { width: 14px; height: 2px; border-radius: 1px; display: inline-block; margin-right: 2px; }
.bs-legend .l-before { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, .7); }
.bs-legend .l-after { background: #22d3ee; box-shadow: 0 0 8px rgba(34, 211, 238, .7); }
.bs-live { width: 8px; height: 8px; border-radius: 50%; background: #00d68f; margin-left: 6px; box-shadow: 0 0 10px #00d68f; animation: bspulse 1.6s infinite; }
@keyframes bspulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* 画布容器 */
.bs-cv { position: relative; width: 100%; flex: 1 1 auto; min-height: 0; }
.bs-cv canvas { display: block; width: 100%; height: 100%; }
.bs-p7 { height: 226px; }
.bs-p7 .bs-cv { height: 172px; }
.bs-p30 { flex: 1 1 auto; min-height: 340px; }
.bs-p30 .bs-cv { min-height: 300px; }

/* KPI 六格 */
.bs-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bs-kpi {
  position: relative; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(16, 34, 55, .92), rgba(8, 18, 31, .92));
  border: 1px solid rgba(45, 212, 238, .22); border-radius: 4px;
  overflow: hidden;
}
.bs-kpi::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .6), transparent);
}
.bs-kpi .k { font-size: 11px; color: #7f9fbb; letter-spacing: 1px; margin-bottom: 8px; }
.bs-kpi .v { font-size: 23px; font-weight: 800; color: #e8f9ff; font-family: var(--mono); line-height: 1.1; letter-spacing: .5px; }
.bs-kpi .v.acc { color: #4fe3c1; text-shadow: 0 0 18px rgba(79, 227, 193, .45); }
.bs-kpi .n { font-size: 10px; color: #587a95; margin-top: 6px; letter-spacing: .5px; }

/* 排行 */
.bs-rank { display: flex; flex-direction: column; gap: 9px; flex: 1 1 auto; }
.bs-rank-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bs-rank-no {
  width: 20px; height: 20px; flex: none; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
  color: #7f9fbb; background: rgba(34, 211, 238, .1); border: 1px solid rgba(45, 212, 238, .25);
}
.bs-rank-item.top1 .bs-rank-no { color: #0b1a26; background: linear-gradient(135deg, #22d3ee, #67e8f9); border-color: #67e8f9; box-shadow: 0 0 12px rgba(34, 211, 238, .5); }
.bs-rank-item.top2 .bs-rank-no { color: #0b1a26; background: linear-gradient(135deg, #a78bfa, #c4b5fd); border-color: #c4b5fd; }
.bs-rank-item.top3 .bs-rank-no { color: #0b1a26; background: linear-gradient(135deg, #f59e0b, #fcd34d); border-color: #fcd34d; }
.bs-rank-name { font-size: 12px; color: #bfeaff; width: 84px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-rank-bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: rgba(45, 212, 238, .12); overflow: hidden; min-width: 20px; }
.bs-rank-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #8b5cf6, #22d3ee); box-shadow: 0 0 10px rgba(34, 211, 238, .55); }
.bs-rank-val { font-size: 12px; font-family: var(--mono); color: #4fe3c1; width: 62px; text-align: right; flex: none; }
.bs-empty { font-size: 12px; color: #587a95; padding: 18px 0; text-align: center; line-height: 1.8; }

/* 环形图 */
.bs-pie { height: 300px; }
.bs-pie-wrap { display: flex; gap: 10px; flex: 1 1 auto; min-height: 0; align-items: center; }
.bs-donut { width: 46%; flex: none; height: 100%; min-width: 120px; }
.bs-donut-c {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none; width: 78%;
}
.bs-donut-c .dv { font-size: 17px; font-weight: 800; color: #e8f9ff; font-family: var(--mono); letter-spacing: .5px; }
.bs-donut-c .dk { font-size: 10px; color: #6b89a8; margin-top: 3px; letter-spacing: 1px; }
.bs-pie-legend { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.bs-lg-item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #9fc3dc; min-width: 0; }
.bs-lg-item em { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.bs-lg-item span.nm { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-lg-item span.pc { font-family: var(--mono); color: #7ee7ff; flex: none; }

/* 实时滚动 */
.bs-pfeed { flex: 1 1 auto; min-height: 236px; }
.bs-feed { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.bs-feed-head, .bs-feed-row {
  display: grid; grid-template-columns: 92px 1fr 88px 54px 74px;
  gap: 6px; align-items: center;
  font-size: 11px; padding: 5px 0;
}
.bs-feed-head {
  color: #587a95; letter-spacing: 1px; border-bottom: 1px solid rgba(45, 212, 238, .18);
  padding-bottom: 8px; font-size: 10px;
}
.bs-feed-body { overflow: hidden; flex: 1 1 auto; }
.bs-feed-row {
  border-bottom: 1px dashed rgba(45, 212, 238, .09);
  font-family: var(--mono);
}
.bs-feed-row .c-time { color: #7f9fbb; white-space: nowrap; overflow: hidden; }
.bs-feed-row .c-app { color: #bfeaff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-feed-row .c-user { color: #6b89a8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-feed-row .c-ev { color: #a78bfa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-feed-row .c-amt { color: #4fe3c1; text-align: right; white-space: nowrap; }
.bs-feed-row.fresh { animation: bsrow .6s ease-out; }
@keyframes bsrow { from { background: rgba(34, 211, 238, .16); } to { background: transparent; } }

/* 响应式：窄屏 / 手机堆成单列 */
@media (max-width: 1180px) {
  .bs-grid { grid-template-columns: 1fr; }
  .bs-p7 { height: 250px; }
  .bs-p30 { min-height: 320px; }
  .bs-pie { height: auto; }
  .bs-pie-wrap { flex-direction: column; align-items: stretch; }
  .bs-donut { width: 100%; height: 190px; }
  .bs-donut-c { width: 60%; }
  .bs-pie-legend { flex-direction: row; flex-wrap: wrap; }
  .bs-lg-item { width: calc(50% - 5px); }
}
@media (max-width: 980px) {
  #pane-screen { margin: 0 -16px 0; }
  .bs { padding: 14px 14px 20px; }
}

@media (max-width: 760px) {
  #pane-screen { margin: 0 -16px 0; }
  .bs-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .bs-head-c { order: -1; text-align: left; }
  .bs-head-l { flex-wrap: wrap; gap: 8px; }
  .bs-head-r { flex-direction: row; align-items: center; justify-content: space-between; }
  .bs { padding: 12px; }
  .bs-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bs-kpi .v { font-size: 17px; }
  .bs-clock { font-size: 18px; }
  .bs-title { font-size: 16px; letter-spacing: 1px; }
  .bs-head { gap: 8px; }
  .bs-feed-head, .bs-feed-row { grid-template-columns: 74px 1fr 58px 46px 62px; font-size: 10px; }
  .bs-lg-item { width: 100%; }
}

/* 排行面板按内容撑开，避免底部大片留白 */
.bs-prank { flex: 0 0 auto; }
.bs-prank .bs-rank { flex: 0 0 auto; }
.bs-prank .bs-rank-item { padding: 5px 0; }
.bs-prank .bs-rank-name { font-size: 12.5px; }

/* ==================== 大屏浅色主题（跟随 body.light） ==================== */
body.light .bs {
  background:
    radial-gradient(1000px 420px at 8% -10%, rgba(8, 145, 178, .16), transparent 70%),
    radial-gradient(900px 400px at 92% 0%, rgba(124, 58, 237, .10), transparent 72%),
    linear-gradient(rgba(8, 145, 178, .05) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(8, 145, 178, .05) 1px, transparent 1px) 0 0 / 32px 100%,
    #eef3f9;
  border-color: rgba(8, 145, 178, .20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 40px rgba(8, 145, 178, .10);
}
body.light .bs-title {
  background: linear-gradient(92deg, #0b2a3d 8%, #0e7490 52%, #6d28d9 96%);
  -webkit-background-clip: text; background-clip: text;
  filter: none;
}
body.light .bs-sub,
body.light .bs-date,
body.light .bs-upd,
body.light .bs-hint { color: #5d7c8f; }
body.light .bs-upd b { color: #0e7490; }
body.light .bs-clock { color: #0b2a3d; text-shadow: 0 0 14px rgba(8, 145, 178, .28); }
body.light .bs-refresh {
  color: #0e7490; background: #ffffff;
  border-color: rgba(8, 145, 178, .40);
}
body.light .bs-refresh:hover { background: #e0f4fb; color: #08506b; box-shadow: 0 0 14px rgba(8, 145, 178, .22); }
body.light .bs-panel {
  background: linear-gradient(180deg, #ffffff, #f7fbfe);
  border-color: rgba(8, 145, 178, .22);
  box-shadow: 0 6px 18px rgba(15, 40, 58, .06);
}
body.light .bs-panel::before { background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .55), transparent); }
body.light .bs-ph h3 { color: #0e3b52; }
body.light .bs-legend { color: #5d7c8f; }
body.light .bs-kpi {
  background: #ffffff;
  border-color: rgba(8, 145, 178, .22);
  box-shadow: 0 6px 16px rgba(15, 40, 58, .06);
}
body.light .bs-kpi::after { background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .50), transparent); }
body.light .bs-kpi .k { color: #5d7c8f; }
body.light .bs-kpi .v { color: #10283a; }
body.light .bs-kpi .v.acc { color: #0f766e; text-shadow: none; }
body.light .bs-kpi .n { color: #6b8798; }
body.light .bs-rank-no {
  color: #5d7c8f; background: rgba(8, 145, 178, .08);
  border-color: rgba(8, 145, 178, .25);
}
body.light .bs-rank-item.top1 .bs-rank-no {
  color: #083344; background: linear-gradient(135deg, #22d3ee, #67e8f9);
  border-color: #22d3ee; box-shadow: 0 0 10px rgba(8, 145, 178, .30);
}
body.light .bs-rank-item.top2 .bs-rank-no {
  color: #2e1065; background: linear-gradient(135deg, #a78bfa, #ddd6fe); border-color: #a78bfa;
}
body.light .bs-rank-item.top3 .bs-rank-no {
  color: #78350f; background: linear-gradient(135deg, #fbbf24, #fde68a); border-color: #fbbf24;
}
body.light .bs-rank-name { color: #0e3b52; }
body.light .bs-rank-bar { background: rgba(8, 145, 178, .12); }
body.light .bs-rank-val { color: #0f766e; }
body.light .bs-empty { color: #6b8798; }
body.light .bs-donut-c .dv { color: #10283a; }
body.light .bs-donut-c .dk { color: #6b8798; }
body.light .bs-lg-item { color: #33566b; }
body.light .bs-lg-item span.pc { color: #0e7490; }
body.light .bs-feed-head { color: #6b8798; border-bottom-color: rgba(8, 145, 178, .18); }
body.light .bs-feed-row { border-bottom-color: rgba(8, 145, 178, .10); }
body.light .bs-feed-row .c-time { color: #5d7c8f; }
body.light .bs-feed-row .c-app { color: #0e3b52; }
body.light .bs-feed-row .c-user { color: #6b8798; }
body.light .bs-feed-row .c-ev { color: #6d28d9; }
body.light .bs-feed-row .c-amt { color: #0f766e; }
body.light .bs-feed-row.fresh { animation: bsrowl .6s ease-out; }
@keyframes bsrowl { from { background: rgba(8, 145, 178, .12); } to { background: transparent; } }
/* preview.css —— 用户端「预览码」页 + 管理端预览码弹窗样式 */
/* ---------- 用户端 ---------- */
#pane-preview { display: none; }

.pv-head {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 16px;
}
.pv-head h2 {
  font-size: 18px; letter-spacing: .5px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; flex: none;
}
.pv-head h2::before {
  content: ""; width: 3px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--blue2), var(--purple));
  box-shadow: 0 0 10px rgba(34, 211, 238, .6);
}
.pv-head p { color: var(--muted); font-size: 12.5px; margin: 0; }
.pv-head .pv-spacer { flex: 1 1 auto; }

.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.pv-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.pv-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .55), transparent);
}
.pv-card:hover { border-color: var(--line-strong); box-shadow: 0 0 22px rgba(34, 211, 238, .12); }

.pv-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pv-card-head .nm { font-size: 15px; font-weight: 700; color: var(--text); }
.pv-card-head .tag {
  font-size: 11.5px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 8px;
}
.pv-card-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.pv-card-head .dot.off { background: var(--muted); box-shadow: none; }

.pv-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.pv-row:last-child { border-bottom: none; }
.pv-row .k { width: 84px; flex: none; color: var(--muted); font-size: 12px; }
.pv-row code {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--blue2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: .3px;
}
.pv-row .cv {
  flex: none; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 11.5px; border-radius: 6px;
  padding: 3px 8px; cursor: pointer; transition: .18s;
}
.pv-row .cv:hover { color: var(--blue2); border-color: var(--line-strong); background: rgba(34, 211, 238, .08); }
.pv-row .none { flex: 1 1 auto; color: #4a6076; font-size: 12px; }

.pv-qr { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; }
.pv-qr canvas {
  display: block; border-radius: 10px; flex: none;
  box-shadow: 0 0 0 1px var(--line), 0 0 18px rgba(34, 211, 238, .14);
  padding: 0; background: #fff;
}
.pv-qr-side { flex: 1 1 auto; min-width: 0; }
.pv-qr-side .tip { color: var(--muted); font-size: 12px; line-height: 1.6; margin-bottom: 8px; }
.pv-qr-side .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-qr-side .btns .pv-btn {
  border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(34, 211, 238, .10);
  color: var(--blue2); font-size: 12px; padding: 6px 12px; cursor: pointer; transition: .18s;
}
.pv-qr-side .btns .pv-btn:hover { background: rgba(34, 211, 238, .2); box-shadow: 0 0 14px rgba(34, 211, 238, .3); }
.pv-qr-side .btns .pv-btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.pv-qr-side .btns .pv-btn.ghost:hover { color: var(--text); border-color: var(--line-strong); }
.pv-qr-side .at { margin-top: 8px; color: #4a6076; font-size: 11.5px; }

.pv-empty {
  border: 1px dashed var(--line); border-radius: 12px; padding: 22px;
  text-align: center; color: var(--muted); font-size: 13px; line-height: 1.8;
}
.pv-empty b { color: var(--text); font-weight: 600; }

.pv-card.none-config .pv-card-head .dot { background: var(--muted); box-shadow: none; }

/* ---------- 管理端弹窗 ---------- */
#preview-mask .modal { width: min(560px, 92vw); }
#preview-mask .modal-body { display: grid; gap: 12px; }
#preview-mask .field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
#preview-mask .field input,
#preview-mask .field textarea {
  width: 100%; background: rgba(6, 12, 20, .86); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); padding: 9px 11px; font-size: 13px;
  font-family: inherit; outline: none; transition: .18s;
}
#preview-mask .field input:focus,
#preview-mask .field textarea:focus { border-color: var(--line-strong); box-shadow: 0 0 0 2px rgba(34, 211, 238, .12); }
#preview-mask .field input::placeholder, #preview-mask .field textarea::placeholder { color: #44607a; }
#preview-mask .field textarea { min-height: 74px; resize: vertical; font-family: var(--mono); font-size: 12px; }
#preview-mask .pv-hint { color: #4a6076; font-size: 11.5px; line-height: 1.7; margin-top: -4px; }
#preview-mask .pv-mini-qr { display: flex; justify-content: center; margin: 2px 0 6px; }
#preview-mask .pv-mini-qr canvas { border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }

body.light #preview-mask .field input,
body.light #preview-mask .field textarea { background: #ffffff; color: #10283a; }
body.light .pv-row code { color: #0e7490; }
body.light .pv-row .none { color: #7d95a8; }
body.light .pv-qr canvas { box-shadow: 0 0 0 1px rgba(8, 145, 178, .3), 0 0 16px rgba(8, 145, 178, .12); }
body.light .pv-qr-side .btns .pv-btn { background: #e0f4fb; color: #0e7490; border-color: rgba(8, 145, 178, .4); }
body.light .pv-qr-side .btns .pv-btn:hover { background: #cbeaf7; }
body.light .pv-qr-side .at, body.light .pv-empty { color: #7d95a8; }

@media (max-width: 760px) {
  .pv-head { flex-wrap: wrap; row-gap: 8px; }
  .pv-head p { flex: 1 1 100%; order: 3; }
  .pv-head .pv-spacer { order: 2; }
  .pv-grid { grid-template-columns: 1fr; }
  .pv-qr { flex-direction: column; align-items: center; }
  .pv-qr-side { width: 100%; text-align: center; }
  .pv-qr-side .btns { justify-content: center; }
  .pv-row .k { width: 72px; }
}

.btn.pv-on { color: var(--gold); border-color: rgba(79, 227, 193, .45); background: rgba(79, 227, 193, .08); }
.btn.pv-on:hover { background: rgba(79, 227, 193, .16); }
body.light .btn.pv-on { color: #0f766e; border-color: rgba(13, 148, 136, .45); background: rgba(13, 148, 136, .08); }

/* 取不到预览码时把授权面板标红 */
.pv-warn-panel { outline: 2px solid rgba(255, 77, 109, .85); box-shadow: 0 0 26px rgba(255, 77, 109, .3); transition: .3s; border-radius: 10px; }
body.light .pv-warn-panel { outline-color: #ef4444; box-shadow: 0 0 20px rgba(239, 68, 68, .18); }

/* ============ 大屏 v14：科技蓝·数据总览 ============ */
.bs2 {
  --bs2-line: rgba(56, 189, 248, .34);
  --bs2-line2: rgba(56, 189, 248, .62);
  --bs2-bg: rgba(8, 20, 40, .72);
  --bs2-text: #cfefff;
  --bs2-muted: #7fa6c7;
  background:
    radial-gradient(1000px 600px at 50% -10%, rgba(37, 99, 235, .22), transparent 65%),
    radial-gradient(700px 500px at 8% 90%, rgba(139, 92, 246, .16), transparent 70%),
    #04080f;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 14px;
  padding: 18px 20px 20px;
  color: var(--bs2-text);
  box-shadow: inset 0 0 60px rgba(37, 99, 235, .12);
}
body.light .bs2 {
  --bs2-line: rgba(2, 132, 199, .24);
  --bs2-line2: rgba(2, 132, 199, .5);
  --bs2-bg: rgba(255, 255, 255, .9);
  --bs2-text: #0f2c47;
  --bs2-muted: #5b7d99;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(56, 189, 248, .16), transparent 65%),
    linear-gradient(180deg, #f4fbff, #eaf4fb);
  border-color: rgba(2, 132, 199, .2);
  box-shadow: 0 10px 30px rgba(15, 76, 129, .08);
}

.bs2-head { text-align: center; position: relative; padding: 6px 0 10px; }
.bs2-brand h1 {
  font-size: 21px; font-weight: 800; letter-spacing: 3px;
  color: var(--bs2-text); margin: 0 0 4px;
  text-shadow: 0 0 18px rgba(56, 189, 248, .55);
}
body.light .bs2-brand h1 { text-shadow: none; color: #0b3a5c; }
.bs2-brand p {
  font-size: 10.5px; letter-spacing: 3.4px; color: var(--bs2-muted); text-transform: uppercase; margin: 0;
}
.bs2-clock { position: absolute; right: 0; top: 2px; text-align: right; }
.bs2-clock b { display: block; font-family: var(--mono); font-size: 22px; letter-spacing: 1px; color: var(--bs2-text); }
.bs2-clock span { font-size: 10.5px; color: var(--bs2-muted); letter-spacing: 1px; }

.bs2-bar { display: flex; align-items: center; gap: 14px; margin: 2px 0 12px; font-size: 11.5px; color: var(--bs2-muted); }
.bs2-live { display: inline-flex; align-items: center; gap: 7px; }
.bs2-live i { width: 7px; height: 7px; border-radius: 50%; background: #00d68f; box-shadow: 0 0 10px #00d68f; animation: bs2pulse 1.6s infinite; }
@keyframes bs2pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
.bs2-upd { margin-left: auto; }
.bs2-upd b { color: var(--bs2-text); font-family: var(--mono); font-weight: 500; }
.bs2-btn {
  border: 1px solid var(--bs2-line2); background: rgba(56, 189, 248, .12);
  color: #67e8f9; border-radius: 7px; padding: 5px 12px; font-size: 12px; cursor: pointer; transition: .18s;
}
body.light .bs2-btn { color: #0369a1; }
.bs2-btn:hover { background: rgba(56, 189, 248, .22); box-shadow: 0 0 14px rgba(56, 189, 248, .3); }

.bs2-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.bs2-kpi {
  position: relative; overflow: hidden;
  background: var(--bs2-bg); border: 1px solid var(--bs2-line); border-radius: 10px;
  padding: 12px 14px 0; min-height: 104px;
  box-shadow: inset 0 0 30px rgba(56, 189, 248, .07);
}
.bs2-kpi::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(56, 189, 248, .12), transparent 55%);
}
.bs2-kpi-ic {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--c); border: 1px solid var(--bs2-line); background: rgba(56, 189, 248, .08);
  font-size: 14px; margin-bottom: 8px;
}
.bs2-kpi-t { font-size: 11.5px; color: var(--bs2-muted); letter-spacing: .5px; }
.bs2-kpi-v { font-size: 24px; font-weight: 800; font-family: var(--mono); color: var(--bs2-text); line-height: 1.25; margin: 2px 0 6px; }
.bs2-kpi-v em { font-size: 11px; font-style: normal; color: var(--bs2-muted); margin-left: 3px; font-weight: 400; }
.bs2-kpi-sp { display: block; width: 100%; height: 34px; }

.bs2-body { display: grid; grid-template-columns: 1.66fr 1fr; gap: 14px; }
.bs2-left { display: grid; grid-template-rows: 1.32fr 1fr; gap: 14px; min-width: 0; }

.bs2-panel {
  background: var(--bs2-bg); border: 1px solid var(--bs2-line); border-radius: 10px;
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  box-shadow: inset 0 0 40px rgba(37, 99, 235, .08);
}
.bs2-ph {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-bottom: 1px solid var(--bs2-line);
  background: linear-gradient(90deg, rgba(56, 189, 248, .1), transparent);
}
.bs2-ph i { width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #38bdf8, #a78bfa); box-shadow: 0 0 10px rgba(56, 189, 248, .8); }
.bs2-ph h3 { font-size: 13.5px; font-weight: 700; letter-spacing: 1px; color: var(--bs2-text); margin: 0; }
.bs2-ph em { font-size: 9.5px; letter-spacing: 1.6px; color: var(--bs2-muted); font-style: normal; text-transform: uppercase; }
.bs2-tag { margin-left: auto; font-size: 10.5px; color: var(--bs2-muted); border: 1px solid var(--bs2-line); border-radius: 999px; padding: 1px 8px; }

.bs2-globe-panel { position: relative; }
.bs2-globe { position: relative; flex: 1; min-height: 0; }
.bs2-globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bs2-globe-tip {
  position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; pointer-events: none;
}
.bs2-globe-tip b { display: block; font-size: 13px; letter-spacing: 2px; color: var(--bs2-text); text-shadow: 0 0 14px rgba(56, 189, 248, .7); }
body.light .bs2-globe-tip b { text-shadow: none; color: #0b3a5c; }
.bs2-globe-tip span { font-size: 8.5px; letter-spacing: 2.2px; color: var(--bs2-muted); }
.bs2-globe-foot {
  display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--bs2-line);
}
.bs2-globe-foot div { padding: 8px 0; text-align: center; }
.bs2-globe-foot b { display: block; font-family: var(--mono); font-size: 17px; color: var(--bs2-text); }
.bs2-globe-foot span { font-size: 10.5px; color: var(--bs2-muted); }

.bs2-trend { min-height: 0; }
.bs2-cv { flex: 1; min-height: 160px; position: relative; }
.bs2-cv canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.bs2-rank-panel { min-height: 0; }
.bs2-rank { flex: 1; overflow: auto; padding: 4px 0 8px; }
.bs2-rk-head, .bs2-rk-row {
  display: grid; grid-template-columns: 1.9fr .9fr .7fr .85fr; gap: 6px; align-items: center;
  padding: 6px 14px; font-size: 12px;
}
.bs2-rk-head { color: var(--bs2-muted); font-size: 11px; letter-spacing: .5px; border-bottom: 1px solid var(--bs2-line); position: sticky; top: 0; background: var(--bs2-bg); }
.bs2-rk-row { color: var(--bs2-text); border-bottom: 1px dashed rgba(56, 189, 248, .12); }
.bs2-rk-row .c1 { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bs2-rk-row .c1 i {
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-style: normal; font-family: var(--mono);
  background: rgba(56, 189, 248, .16); color: #67e8f9; flex: none;
}
.bs2-rk-row .c1 i.n1 { background: rgba(245, 158, 11, .9); color: #21160a; }
.bs2-rk-row .c1 i.n2 { background: rgba(203, 213, 225, .85); color: #1a222b; }
.bs2-rk-row .c1 i.n3 { background: rgba(217, 119, 6, .7); color: #fff; }
body.light .bs2-rk-row .c1 i { background: rgba(2, 132, 199, .12); color: #0369a1; }
.bs2-rk-row .c1 span, .bs2-rk-row .c1 em { min-width: 0; }
.bs2-rk-row .c1 .bar {
  height: 3px; width: 40%; border-radius: 2px; display: block; flex: none;
  background: linear-gradient(90deg, #38bdf8, rgba(56, 189, 248, 0));
  box-shadow: 0 0 10px rgba(56, 189, 248, .6);
}
.bs2-rk-row .c1 em { max-width: 44%; }
.bs2-rk-row .c1 { flex-wrap: nowrap; }
.bs2-rk-row .c1 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs2-rk-row .c2 { font-family: var(--mono); color: #4ade80; }
body.light .bs2-rk-row .c2 { color: #059669; }
.bs2-rk-row .c3, .bs2-rk-row .c4 { font-family: var(--mono); color: var(--bs2-muted); }
.bs2-empty { padding: 22px 14px; color: var(--bs2-muted); font-size: 12.5px; text-align: center; }

@media (max-width: 1180px) {
  .bs2-kpis { grid-template-columns: repeat(3, 1fr); }
  .bs2-body { grid-template-columns: 1fr; }
  .bs2-left { grid-template-rows: minmax(280px, 1fr) minmax(200px, .8fr); }
  .bs2-rank { max-height: 420px; }
}
@media (max-width: 640px) {
  .bs2 { padding: 14px 12px 16px; border-radius: 10px; }
  .bs2-head { padding-top: 0; }
  .bs2-brand h1 { font-size: 16px; letter-spacing: 1px; }
  .bs2-clock { position: static; text-align: center; margin-top: 8px; display: flex; gap: 8px; justify-content: center; align-items: baseline; }
  .bs2-clock b { font-size: 16px; }
  .bs2-bar { flex-wrap: wrap; gap: 8px; }
  .bs2-upd { margin-left: 0; width: 100%; }
  .bs2-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .bs2-kpi { min-height: 92px; padding: 10px 12px 0; }
  .bs2-kpi-v { font-size: 19px; }
  .bs2-rk-head, .bs2-rk-row { grid-template-columns: 1.5fr .85fr .6fr; }
  .bs2-rk-head .c4, .bs2-rk-row .c4 { display: none; }
  .bs2-globe-foot b { font-size: 14px; }
}


/* ---------- 批量导入游戏 ---------- */
#gm-batch {
  width: 100%; min-height: 132px; padding: 12px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  resize: vertical; outline: none;
}
#gm-batch:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(34, 211, 238, .12); }
#gm-batch::placeholder { color: var(--muted); opacity: .85; }
body.light #gm-batch { background: #fff; }
#batch-result .table-wrap { max-height: 280px; overflow: auto; }
#batch-result .table-wrap table { margin-top: 0; }