:root {
  --bg: #0b1220;
  --bg2: #0e1626;
  --card: #121c2e;
  --card2: #16223a;
  --line: #1e2a3d;
  --text: #e8edf5;
  --muted: #8a99b0;
  --green: #19c37d;
  --green-dim: rgba(25, 195, 125, 0.14);
  --orange: #ff8a3d;
  --orange-dim: rgba(255, 138, 61, 0.14);
  --cyan: #38bdf8;
  --danger: #ff4d4f;
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  padding-bottom: 78px;
}

/* ------------------------------------------------------------ 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sound-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(25, 195, 125, 0.45);
  background: var(--green-dim);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.sound-btn.off {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}
.sound-btn:active { transform: scale(0.94); }
.topbar .brand-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
  box-shadow: 0 0 10px var(--green);
}
.topbar .who {
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------------------------------------ 主区 */
main {
  flex: 1;
  /* 底部留出导航栏高度 + 安全区，否则最后一张卡片会被导航遮住 */
  padding: 14px 14px calc(84px + env(safe-area-inset-bottom));
}
.view { display: none; }
.view.active { display: block; animation: fadein 0.18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 60px 20px;
  line-height: 1.9;
}
.empty .big { display: block; font-size: 30px; margin-bottom: 10px; opacity: 0.45; }

/* 非超级会员的初盘锁定页 */
.locked {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--card);
}
.locked .ico { font-size: 34px; opacity: 0.75; }
.locked .num {
  margin-top: 8px;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.locked .cap { margin-top: 4px; font-size: 13px; color: var(--muted); }
.locked .tip {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.locked .tip.strong {
  margin-top: 6px;
  color: #ffd76a;
  font-weight: 600;
}

/* ------------------------------------------------------------ 滚球卡片 */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 22px;
  margin-bottom: 12px;
  text-align: center;
  touch-action: pan-y;
  will-change: transform;
  transition: transform 0.18s ease, opacity 0.18s ease;
  overflow: hidden;
}
.card.enter { animation: cardin-up 0.26s ease; }
@keyframes cardin-up {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.card.prematch.enter { animation: cardin 0.28s ease; }
@keyframes cardin {
  from { opacity: 0; transform: translateY(-10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.card.leaving {
  transform: translateX(-110%) !important;
  opacity: 0;
  margin-bottom: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  transition: all 0.26s ease;
}
.card.dragging { transition: none; }

.card .headline {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #c3cfdf;
  line-height: 1.45;
}

/* 皇冠走地徽章：卡片左上角 */
.card .crown-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #3b2a00;
  background: linear-gradient(135deg, #ffd76a, #f0a92c);
  box-shadow: 0 2px 8px rgba(240, 169, 44, 0.35);
  z-index: 2;
}

/* 「只看皇冠」筛选 */
.filter-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.crown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg2);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.crown-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #f0a92c;
  cursor: pointer;
}
.crown-toggle:has(input:checked),
.crown-toggle.on {
  border-color: rgba(240, 169, 44, 0.6);
  color: #ffd76a;
  background: rgba(240, 169, 44, 0.12);
}
#live-list.crown-only .card:not(.crown) { display: none; }
.disclaimer {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
  color: #7f8da3;
}
.card .label-top .disclaimer {
  margin-top: 6px;
  font-size: 11px;
  color: #7f8da3;
}
.card .makeup {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--orange);
  background: var(--orange-dim);
  border: 1px solid rgba(255, 138, 61, 0.3);
}
.card .league {
  display: inline-block;
  margin-top: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  letter-spacing: 0.6px;
}
.card .score {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #9fb0c8;
}
.card .teams {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.5;
  color: var(--text);
}
.card .teams .vs {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  padding: 0 10px;
}
.card .recommend {
  margin-top: 16px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.card.prematch .recommend { color: var(--cyan); }
.card.prematch .tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.card .minute {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.card .matchtime {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card .label-top {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--muted);
  margin-bottom: 10px;
}
.card .close {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #b9c6d8;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card .close:hover { color: var(--danger); background: rgba(255, 77, 79, 0.1); }
.card .timerbar {
  position: absolute;
  left: 0; top: 0;
  height: 5px;
  background: linear-gradient(90deg, #19c37d 0%, #6cf3b6 55%, #a7ffd6 100%);
  width: 100%;
  transform-origin: left;
  opacity: 1;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(25, 195, 125, 0.75), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  z-index: 3;
}

/* ------------------------------------------------------------ 历史 */
.segmented {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  background: var(--bg2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.segmented button {
  flex: 1;
  padding: 9px 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.segmented button.on {
  background: var(--card2);
  color: var(--text);
  font-weight: 600;
}
/* 历史的时间范围切换：4 个按钮，字小一点更紧凑 */
#hist-range {
  margin-top: -6px;
}
#hist-range button {
  font-size: 12px;
  padding: 8px 0;
}

.hitem {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.hitem .row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  gap: 10px;
}
.hitem .hleague {
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
}
.hitem .badge {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.1;
  min-width: 68px;
  text-align: center;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* 历史统计条 */
.hist-stats {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  text-align: center;
}
.hist-stats .rate {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.hist-stats .rate small {
  font-size: 13px;
  font-weight: 600;
  margin-left: 2px;
}
.hist-stats .rate.up { color: #ff6b6b; }
.hist-stats .rate.down { color: #8e9bad; }
.hist-stats .sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.hist-stats .sub b { color: var(--text); font-weight: 700; }
.hist-stats .sub .w { color: #ff6b6b; }
.hist-stats .sub .l { color: #8e9bad; }
.badge.res-win {
  color: #fff;
  background: linear-gradient(135deg, #ff4d4f, #c81e1e);
  box-shadow: 0 2px 12px rgba(255, 77, 79, 0.4);
}
.badge.res-half_win {
  color: #ffcac7;
  background: linear-gradient(135deg, #8a2b28, #5d1b19);
  border-color: rgba(255, 110, 105, 0.45);
}
.badge.res-half_lose {
  color: #b9c7d8;
  background: linear-gradient(135deg, #232f3d, #18212c);
  border-color: rgba(150, 170, 190, 0.3);
}
.badge.res-lose {
  color: #8e9bad;
  background: linear-gradient(135deg, #10161f, #0a0f16);
  border-color: rgba(120, 135, 155, 0.25);
}
.badge.res-push {
  color: #c7d2e0;
  background: rgba(120, 135, 155, 0.16);
  border-color: rgba(120, 135, 155, 0.35);
}
.badge.res-void {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}
.badge.pending {
  color: var(--muted);
  background: rgba(138, 153, 176, 0.12);
  border-color: rgba(138, 153, 176, 0.25);
  font-weight: 600;
  letter-spacing: 1px;
}
.hitem .hscore {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.hitem .main { font-size: 15px; line-height: 1.6; }
.hitem .main .vs { color: var(--muted); font-size: 12px; padding: 0 6px; }
.hitem .foot {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.hitem .foot .rec { color: var(--orange); font-weight: 600; }
.hitem .foot .rec.cyan { color: var(--cyan); }

.loadmore {
  width: 100%;
  padding: 13px;
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* ------------------------------------------------------------ 我的 */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.panel h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel h3 .hint { font-size: 11px; color: var(--muted); font-weight: 400; }

.profile { text-align: center; padding: 22px 0 6px; }
.avatar {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #0f8f5c);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #04120c;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 有图时不要底色，避免 PNG 透明区域透出绿色 */
.avatar.has-img {
  background: transparent;
}
.profile .name { font-size: 17px; font-weight: 600; }
.profile .role {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--green-dim);
  color: var(--green);
}
.profile .expire {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.profile .expire.warn { color: var(--orange); }
.profile .expire.bad { color: var(--danger); }

.btns { display: flex; flex-direction: column; gap: 10px; }
.btn {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}
.btn.primary { background: var(--green); color: #04120c; border-color: var(--green); font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255, 77, 79, 0.35); background: transparent; }
.btn.sm { padding: 8px 12px; font-size: 12px; border-radius: 9px; width: auto; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* 子账号行 */
.child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.child:last-child { border-bottom: 0; }
.child .info { flex: 1 1 100%; min-width: 0; }
.child .info .n { font-size: 14px; }
.child .info .s { font-size: 11px; color: var(--muted); margin-top: 5px; }
.child .cred {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.child .cred-k {
  font-size: 11px;
  color: var(--muted);
}
.child .cred-v {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  user-select: all;
  -webkit-user-select: all;
}
.child .cred-v + .cred-k { margin-left: 12px; }
.child .cred-v.empty {
  color: var(--muted);
  font-weight: 400;
  font-family: inherit;
  font-size: 12px;
}
.child .ops {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
}
.child .ops .chip {
  flex: 1 1 auto;
  min-width: 64px;
  text-align: center;
}

.chip {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.chip.on { border-color: rgba(25, 195, 125, 0.5); color: var(--green); background: var(--green-dim); }
.chip.off { border-color: rgba(255, 77, 79, 0.35); color: var(--danger); }

.mode-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.mode-row .opt {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg2);
  cursor: pointer;
  text-align: center;
}
.mode-row .opt.on {
  border-color: var(--green);
  background: var(--green-dim);
}
.mode-row .opt .t { font-size: 13px; }
.mode-row .opt .d { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* ------------------------------------------------------------ 底栏 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: flex;
  background: rgba(14, 22, 38, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
}
.tabbar button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}
.tabbar button .ico { font-size: 19px; line-height: 1; }
.tabbar button.on { color: var(--green); }

/* ------------------------------------------------------------ 登录页 */
.login-wrap {
  min-height: 100vh;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
}
.login-wrap .logo {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green), #0b7a4e);
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.login-wrap h1 {
  text-align: center;
  font-size: 20px;
  margin: 0 0 6px;
  letter-spacing: 1px;
}
.login-wrap .sub {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 32px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%;
  padding: 14px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.field input:focus {
  border-color: rgba(25, 195, 125, 0.6);
  box-shadow: 0 0 0 3px rgba(25, 195, 125, 0.12);
}
.login-wrap .btn { width: 100%; margin-top: 8px; padding: 15px; }
.err {
  margin-top: 14px;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
  min-height: 18px;
}
.foot-note {
  margin-top: 28px;
  text-align: center;
  font-size: 11px;
  color: #55637a;
  line-height: 1.7;
}

/* ------------------------------------------------------------ 弹层 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 15, 0.7);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-mask.on { display: flex; }
.modal {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
.modal h2 { margin: 0 0 18px; font-size: 16px; }
.modal .field { margin-bottom: 12px; }
.modal .actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .actions .btn { flex: 1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 42, 61, 0.98);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  padding: 11px 18px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 200;
  max-width: 80vw;
  text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------ 后台 */
.admin-wrap {
  width: 100%;
  max-width: 1080px;
  padding: 20px;
}
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.admin-head h1 { font-size: 18px; margin: 0; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-tabs button {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.admin-tabs button.on { background: var(--green); color: #04120c; border-color: var(--green); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }

#accounts-box, #logs-box, #pushes-box, #signals-box, #clients-box, #sec-box, #history-box {
  overflow-x: auto;
  padding-bottom: 2px;
}

/* 操作列：两列网格，避免按钮被挤出可视区 */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 6px;
  justify-content: end;
  align-items: center;
}
.ops-grid .btn,
.ops-grid .chip {
  white-space: nowrap;
}
.ops-grid > div { grid-column: 1 / -1; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
table.data th, table.data td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th { color: var(--muted); font-weight: 500; background: var(--bg2); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.wrap { white-space: normal; max-width: 320px; }

/* 账号表：整体居中，观感更整齐 */
#accounts-box table.data th,
#accounts-box table.data td {
  text-align: center;
}
#accounts-box .ops-grid {
  justify-content: center;
}

/* 账号表：压缩「最后登录」，把空间让给「操作」 */
#accounts-box table.data th:nth-child(8),
#accounts-box table.data td:nth-child(8) {
  width: 1%;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#accounts-box table.data th:nth-child(7),
#accounts-box table.data td:nth-child(7) {
  width: 1%;
  font-size: 11px;
  color: var(--muted);
}
#accounts-box table.data th:nth-child(9),
#accounts-box table.data td:nth-child(9) {
  min-width: 220px;
  padding-left: 14px;
}
.tag-ok { color: var(--green); }
.tag-bad { color: var(--danger); }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.row-form input, .row-form select {
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.row-form input:focus, .row-form select:focus { border-color: rgba(25, 195, 125, 0.6); }
.key-box {
  background: var(--bg2);
  border: 1px dashed rgba(25, 195, 125, 0.5);
  border-radius: 10px;
  padding: 12px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--green);
  word-break: break-all;
  margin-bottom: 14px;
}

/* 关于页（用户端） */
.about-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--text);
  word-break: break-word;
}
.about-wrap h1, .about-wrap h2, .about-wrap h3, .about-wrap h4 {
  margin: 18px 0 10px;
  line-height: 1.4;
}
.about-wrap h1:first-child, .about-wrap h2:first-child, .about-wrap h3:first-child { margin-top: 0; }
.about-wrap p { margin: 0 0 12px; }
.about-wrap ul, .about-wrap ol { margin: 0 0 12px; padding-left: 22px; }
.about-wrap li { margin: 4px 0; }
.about-wrap a { color: var(--green); text-decoration: underline; }
.about-wrap hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.about-wrap code {
  background: var(--bg2);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12px;
}

/* 后台富文本编辑器 */
.rt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
}
.rt-sep { width: 1px; background: var(--line); margin: 0 4px; }
.rt-editor {
  min-height: 320px;
  max-height: 60vh;
  overflow: auto;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.9;
  outline: none;
}
.rt-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}
