:root {
  --bg: #0a0b0d;
  --bg-soft: #101216;
  --panel: #14161b;
  --panel-2: #191c22;
  --line: #252931;
  --line-soft: #1e2229;
  --text: #e9eaee;
  --muted: #8a909c;
  --dim: #5c626d;
  --accent: #f0a08e;
  --accent-dim: rgba(240, 160, 142, 0.12);
  --accent-line: rgba(240, 160, 142, 0.35);
  --ok: #7fd1a8;
  --err: #ef7d7d;
  --warn: #e7c27d;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

/* 高度用 min-height 而非 height：height:100% 会把 body 锁死成一屏，
   超出部分被裁切且无法滚动（用户反馈无法滑动、看不到下方进度）。
   min-height 保证内容可撑高、页面可正常滚动。 */
html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: flex-start;   /* 内容高于屏幕时不裁切顶部 */
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
}

/* 背景柔光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(55% 45% at 50% -8%, rgba(240, 160, 142, 0.11), transparent 72%),
    radial-gradient(45% 40% at 88% 102%, rgba(150, 120, 190, 0.07), transparent 72%),
    radial-gradient(30% 30% at 4% 60%, rgba(240, 160, 142, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* 细网格纹理 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  width: 100%;
  max-width: 440px;
  margin: auto;
  position: relative;
  z-index: 1;
}
/* 后台控制台：占满屏幕宽度，两侧留白收窄 */
.wrap.wide { max-width: 1320px; }
/* 中等宽度：二级后台等表单类页面 */
.wrap.mid { max-width: 720px; }

/* 宽屏下 body 内边距收窄，让内容真正贴边 */
@media (min-width: 1100px) {
  body { padding: 24px 28px; }
  .wrap.wide { max-width: 1320px; }
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
  text-align: left;
}

.brand-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 22px rgba(240, 160, 142, 0.18), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.brand-text h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.3;
}

.brand h1 span { color: var(--accent); }

.brand-text p {
  margin: 3px 0 0;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* 退出登录按钮 */
.brand-text { flex: 1; min-width: 0; }
.logout-btn {
  flex: 0 0 auto;
  align-self: center;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  letter-spacing: 1px;
}
.logout-btn:hover {
  color: var(--err);
  border-color: rgba(239, 125, 125, .4);
  background: rgba(239, 125, 125, .06);
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 160, 142, 0.42), transparent);
}

.card + .card { margin-top: 16px; }

.card-title {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: "";
  width: 3px;
  height: 13px;
  background: var(--accent);
  border-radius: 2px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  height: 44px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  font-family: inherit;
}

input::placeholder { color: var(--dim); }

input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

input:disabled {
  color: var(--muted);
  background: var(--panel);
  border-color: var(--line-soft);
  cursor: not-allowed;
  opacity: .7;
}

.row {
  display: flex;
  gap: 10px;
}
.row > * { flex: 1; min-width: 0; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform .12s, background .18s, opacity .18s, border-color .18s;
}

button:active { transform: translateY(1px); }

.btn {
  width: 100%;
  height: 46px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, #f6b6a6, var(--accent));
  color: #1a1210;
  box-shadow: 0 6px 18px rgba(240, 160, 142, 0.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ffc6b7, #f4ad9c);
  box-shadow: 0 10px 24px rgba(240, 160, 142, 0.32);
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--line); }

.btn-sm {
  width: auto;
  height: 34px;
  font-size: 12px;
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0 12px;
}
.btn-sm:hover { color: var(--text); border-color: var(--accent-line); }

.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-bar input {
  flex: 1;
  min-width: 0;
}
.search-bar .btn-sm {
  height: 44px;
  flex: 0 0 auto;
}

/* 搜索命中高亮 */
.search-hit {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: var(--accent-dim) !important;
}
.key-item.search-hit code,
.search-hit .copyable,
tr.search-hit td {
  color: var(--accent);
}
tr.search-hit td {
  background: var(--accent-dim);
}

.msg {
  min-height: 20px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--err);
  text-align: center;
}
.msg.ok { color: var(--ok); }

/* 门禁遮罩 */
#gate, #adminGate, #recordsGate {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 7, 9, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;   /* 纵向堆叠：多张卡片上下排，不再左右并排 */
  align-items: center;
  /* 不用 justify-content:center —— flex 居中时内容高于视口会把底部裁掉且滚不到
     （「开始洗号」按钮被裁、用户反馈找不到）。
     改用 auto margin：空间够时垂直居中，空间不足时从顶部排布并可正常滚动。 */
  justify-content: flex-start;
  gap: 16px;
  padding: 32px 20px;
  overflow-y: auto;         /* 内容超高时可滚动 */
}
/* 子元素不压缩，保证按钮等不被压扁 */
#gate > *, #adminGate > *, #recordsGate > * { flex: 0 0 auto; }
/* 垂直居中：给「当前可见的主卡片」加 .gate-main，margin-top:auto 会吃掉剩余空间。
   内容矮 → 卡片垂直居中；内容高 → auto 归零，从顶部排布，可滚动到末尾，
   不会再出现底部被裁、「开始洗号」按钮点不到的情况。 */
#gate > .gate-main, #adminGate > .gate-main, #recordsGate > .gate-main { margin-top: auto; }
#gate > .gate-main + *, #adminGate > .gate-main + *, #recordsGate > .gate-main + * { margin-top: 16px; }
#gate.hidden { display: none; }
#adminGate { display: none; }

#gate .card, #adminGate .card, #recordsGate .card { max-width: 420px; width: 100%; }
/* 门禁内的次要卡片（下载 / 售后群）与主卡同宽，保持视觉统一 */
#gate .card + .card { max-width: 420px; }

.gate-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border: 1px solid var(--accent-line);
  background: var(--accent-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.gate-icon svg { width: 20px; height: 20px; }

.gate-avatar {
  display: block;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 26px rgba(240, 160, 142, 0.2), 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* 警示 */
.notice {
  background: rgba(231, 194, 125, 0.06);
  border: 1px solid rgba(231, 194, 125, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--warn);
  font-size: 12px;
  line-height: 1.75;
}
.notice strong { color: #f0d49c; font-weight: 600; }

/* 倒计时 */
#taskPanel { display: none; margin-top: 18px; }
#taskPanel.show { display: block; }

.timer-label {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.task-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.task-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s infinite;
}
.task-status.done { color: var(--ok); }
.task-status.done::before { animation: none; }

.tip-banner {
  display: none;
  background: rgba(231, 194, 125, 0.06);
  border: 1px solid rgba(231, 194, 125, 0.22);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--warn);
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.tip-banner.show { display: block; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 160, 142, .5); }
  70% { box-shadow: 0 0 0 8px rgba(240, 160, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 160, 142, 0); }
}

.timer {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 3px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(240, 160, 142, 0.25);
}

.progress {
  height: 3px;
  background: var(--line-soft);
  border-radius: 3px;
  overflow: hidden;
  margin: 16px 0 14px;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #d98f9a);
  transition: width .5s linear;
}

.stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.stats b { color: var(--text); font-family: var(--mono); font-weight: 600; }

.round-remain {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.round-remain b {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 600;
  margin-left: 4px;
}

.done-banner {
  display: none;
  text-align: center;
  color: var(--ok);
  font-size: 14px;
  padding: 14px 0 2px;
  letter-spacing: 1px;
}
.done-banner.show { display: block; }

.hint {
  text-align: center;
  color: var(--dim);
  font-size: 11px;
  margin-top: 14px;
}

.link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.link:hover { color: var(--accent); }

/* App 下载栏（登录门禁底部） */
.download-bar {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.download-label {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 1px;
}
.btn-download {
  width: auto;
  height: 38px;
  padding: 0 22px;
  font-size: 13px;
  border-radius: 9px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all .2s ease;
}
/* 官方 App 下载（门禁页三端入口） */
.app-bar {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.app-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; gap: 8px;
}
.app-more {
  font-size: 11px; color: var(--accent); text-decoration: none; white-space: nowrap;
}
.app-more:hover { text-decoration: underline; }
.app-list { display: flex; flex-direction: column; gap: 8px; }
.app-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--panel-2); text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}
.app-item:hover { border-color: var(--accent-line); background: rgba(240, 160, 142, .07); }
.app-item:active { transform: translateY(1px); }
.app-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #20130f;
}
.app-ico-user { background: linear-gradient(135deg, #f0a08e, #e5836d); }
.app-ico-admin { background: linear-gradient(135deg, #e8b96a, #d19b45); }
.app-ico-sub { background: linear-gradient(135deg, #78c6b4, #4fa791); }
.app-txt { flex: 1; text-align: left; display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.app-txt b { font-size: 13px; color: var(--text); font-weight: 600; }
.app-txt small { font-size: 11px; color: var(--dim); }
.app-go {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}

.btn-download:hover {
  background: rgba(240, 160, 142, 0.1);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(240, 160, 142, 0.15);
}

/* 官方售后群（门禁底部） */
.group-bar {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.group-label {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 1px;
}
.btn-group {
  width: auto;
  min-width: 168px;
  height: 38px;
  padding: 0 20px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: transparent;
  border: 1px dashed var(--accent-line);
  border-radius: 9px;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-group:hover {
  background: rgba(240, 160, 142, 0.1);
  border-style: solid;
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(240, 160, 142, 0.15);
}
.btn-group.copied {
  color: var(--ok);
  border-style: solid;
  border-color: rgba(127, 209, 168, .45);
  background: rgba(127, 209, 168, .08);
}
.group-tip {
  font-size: 11px;
  color: var(--dim);
}

/* 后台列表 */
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.list-head .card-title { margin: 0; white-space: nowrap; flex: 0 0 auto; }
.list-head .btn { flex: 0 0 auto; }

.keys {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}
.keys::-webkit-scrollbar { width: 4px; }
.keys::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.key-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 11px;
}
.key-item code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.5px;
  flex: 1;
  cursor: pointer;
}
.key-item code:hover { color: var(--accent); }
.key-item .tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--dim);
  white-space: nowrap;
}
.key-item .tag.used { color: var(--ok); border-color: rgba(127, 209, 168, .3); }
.key-item .tag.expired { color: var(--err); border-color: rgba(239, 125, 125, .3); }

/* 批次标题栏 */
.batch-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px 2px;
  margin-top: 6px;
}
.batch-head:first-child { margin-top: 0; }
.batch-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-head em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
}
.batch-head .btn-sm { flex: 0 0 auto; }

/* 生成结果复制栏 */
.gen-copybar {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
}

/* 复制提示 toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%) translateY(12px);
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--accent-line);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 12px;
  letter-spacing: 0.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.task-status-pill {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.task-status-pill.done { color: var(--ok); border-color: rgba(127, 209, 168, .4); background: rgba(127, 209, 168, .08); }
.task-status-pill.running { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
.key-del {
  background: transparent;
  color: var(--dim);
  font-size: 17px;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  padding: 0;
}
.key-del:hover { color: var(--err); background: rgba(239, 125, 125, .08); }
.btn-danger { white-space: nowrap; flex: 0 0 auto !important; }
.btn-danger:hover { color: var(--err); border-color: rgba(239, 125, 125, .4); }
.rec-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  margin-top: 3px;
  line-height: 1.4;
}

/* 账号记录表格 */
.table-wrap { overflow-x: auto; }
.rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 620px;
}
.rec-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.rec-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  font-family: var(--mono);
  white-space: nowrap;
}
.rec-table tr:last-child td { border-bottom: none; }
.copyable { cursor: pointer; border-bottom: 1px dashed transparent; }
.copyable:hover { color: var(--accent); border-bottom-color: var(--accent-line); }

.empty {
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  padding: 24px 0;
}

.gen-result {
  background: var(--panel-2);
  border: 1px solid var(--accent-line);
  border-radius: 9px;
  padding: 12px;
  margin-top: 14px;
}
.gen-result .gen-title {
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 8px;
}
.gen-result code {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  padding: 3px 0;
  cursor: pointer;
  user-select: all;
}
.gen-result code:hover { color: var(--accent); }

.foot {
  text-align: center;
  color: var(--dim);
  font-size: 11px;
  margin-top: 22px;
}

/* 手动确认弹窗 */
.confirm-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 7, 9, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-mask.show { display: flex; }
.confirm-card { max-width: 380px; width: 100%; }
.confirm-info {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px 14px;
  margin-bottom: 14px;
}
.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  font-size: 13px;
}
.confirm-row + .confirm-row { border-top: 1px solid var(--line-soft); }
.confirm-row span { color: var(--muted); }
.confirm-row b {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
  word-break: break-all;
  text-align: right;
}

/* 公告弹窗正文 */
.announce-body {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 50vh;
  overflow: auto;
}

/* 登陆进度 */
#loginPanel { display: none; margin-top: 18px; }
#loginPanel.show { display: block; }
.login-label {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.login-pct {
  text-align: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 8px;
}

/* ---------- 卡型 / 轮次 / 再次运行 ---------- */
.task-meta { display: flex; gap: 8px; justify-content: center; margin: 8px 0 4px; flex-wrap: wrap; }
.meta-chip {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--accent-line); color: var(--accent);
  background: var(--accent-dim); letter-spacing: .5px;
}
.next-bar { text-align: center; margin-top: 14px; }
.next-bar .btn { min-width: 160px; }
.next-bar .hint { margin-top: 8px; }
.used-banner {
  display: none; margin-top: 14px; padding: 10px 14px; text-align: center;
  font-size: 12px; color: var(--dim); border: 1px dashed var(--line);
  border-radius: 8px; background: rgba(255,255,255,.02);
}

/* ---------- 表单下拉 ---------- */
select {
  width: 100%; padding: 10px 12px; font-size: 13px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; outline: none;
  font-family: inherit; cursor: pointer;
}
select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
select option { background: var(--panel-2); color: var(--text); }

/* ---------- 卡型标签（管理端/二级后台） ---------- */
.key-item .tag.t-once { color: var(--muted); border-color: var(--line); }
.key-item .tag.t-three { color: #e7c27d; border-color: rgba(231,194,125,.4); }
.key-item .tag.t-unl { color: #8ab4f8; border-color: rgba(138,180,248,.4); }

/* ---------- 后台统一顶部导航 ---------- */
.cnav {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 14px; margin-bottom: 18px;
}
.cnav-brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.cnav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim);
}
.cnav-links { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.cnav-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--muted); text-decoration: none;
  padding: 6px 10px; border-radius: 8px; border: 1px solid transparent;
  white-space: nowrap; transition: all .15s ease;
}
.cnav-item:hover { color: var(--text); background: var(--panel-2); border-color: var(--line); }
.cnav-item.on { color: var(--accent); background: var(--accent-dim); border-color: var(--accent-line); font-weight: 600; }
.cnav-ico { font-size: 13px; line-height: 1; }
.cnav-right { display: flex; align-items: center; gap: 8px; }
.cnav-logout {
  font-size: 12px; color: var(--muted); cursor: pointer;
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; white-space: nowrap;
}
.cnav-logout:hover { color: var(--err); border-color: rgba(239,125,125,.4); }
/* 待核销数量红点（支付核销入口） */
.cnav-badge {
  display: inline-block; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: var(--err); color: #1b0d0d;
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
  margin-left: 2px; vertical-align: 1px;
}
.cnav-badge[hidden] { display: none; }

/* ---------- 移动端底部标签栏（管理端 App 内） ---------- */
.ctabs { display: none; }
@media (max-width: 720px) {
  /* 顶部导航在窄屏：品牌独占一行，导航项占满整行并横向滚动
     （原先 9 项换行成 3 行占 143px，现为单行 ~34px，底部标签栏承担主导航） */
  .cnav { gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
  /* 卡片标题与说明文字分行，避免标题被折成两行（如"支付核销"） */
  .card-title { flex-wrap: wrap; row-gap: 2px; }
  .card-title > span { flex: 1 0 100%; }
  .cnav-brand { width: 100%; order: 1; }
  .cnav-links {
    order: 2; width: 100%; flex: 1 1 100%; min-width: 0;
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 2px;
    margin: 0 -2px; padding: 0 2px;
  }
  .cnav-links::-webkit-scrollbar { display: none; }
  .cnav-item { font-size: 11px; padding: 5px 8px; flex: 0 0 auto; }
  .cnav-right { flex: 0 0 auto; order: 0; margin-left: auto; }

  /* 底部标签栏：固定在屏幕底部，App 内一步直达常用模块 */
  #ctabsSlot { display: block; }
  .ctabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: rgba(20, 22, 27, .96);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .45);
  }
  .ctab {
    flex: 1 1 0; min-width: 0; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 5px 2px; text-decoration: none;
    color: var(--muted); font-size: 10px; border-radius: 9px;
    -webkit-tap-highlight-color: transparent;
  }
  .ctab:active { background: var(--panel-2); }
  .ctab-ico { font-size: 17px; line-height: 1; }
  .ctab-txt {
    font-size: 10px; line-height: 1.2; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  }
  .ctab.on { color: var(--accent); }
  .ctab.on .ctab-ico { text-shadow: 0 0 12px rgba(240, 160, 142, .55); }
  /* 标签栏上的待核销数量红点 */
  .ctab-badge {
    position: absolute; top: 0; right: 50%; transform: translateX(24px);
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: var(--err); color: #1b0d0d; font-size: 10px; font-weight: 700;
    line-height: 16px; text-align: center;
    box-shadow: 0 0 0 2px rgba(20, 22, 27, .96);
  }
  .ctab-badge[hidden] { display: none; }

  /* 给底部标签栏留出空间，避免遮挡页面内容 */
  body { padding-bottom: 74px; }
}

/* ---------- 记住密码 / 记住账号 ---------- */
.remember-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted); cursor: pointer;
  margin: 2px 0 12px; user-select: none;
}
.remember-row input { width: auto; accent-color: var(--accent); cursor: pointer; }
.remember-row:hover { color: var(--text); }

/* ---------- 导航中心模块卡片 ---------- */
.mod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
/* 宽屏：模块卡片固定三列，6 个模块正好两行三列，视觉均衡 */
@media (min-width: 900px) {
  .mod-grid { grid-template-columns: repeat(3, 1fr); }
}
.mod-card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 18px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.mod-card:hover {
  transform: translateY(-3px); border-color: var(--accent-line);
  background: linear-gradient(160deg, rgba(240,160,142,.08), var(--panel) 70%);
}
.mod-ico {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
  background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-line);
}
.mod-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.mod-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }
.mod-arrow { float: right; color: var(--dim); font-size: 16px; }
.mod-card:hover .mod-arrow { color: var(--accent); }

/* ---------- 用户账号门禁：注册/登录/兑换 ---------- */
.auth-tabs {
  display: flex; gap: 6px; margin: 2px 0 18px;
  border-bottom: 1px solid var(--line-soft);
}
.auth-tab {
  flex: 1; background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; padding: 9px 0 10px;
  cursor: pointer; transition: color .16s, border-color .16s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { flex: 0 0 auto; white-space: nowrap; }
.code-row .btn-sm { width: auto; }
/* 兑换区的输入框需要足够宽度显示完整卡密 */
#redeemKey { min-width: 220px; }
.credit-box {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px;
}
.credit-item {
  flex: 1; min-width: 130px; background: var(--panel-2);
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px;
}
.credit-item span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.credit-item b {
  display: block; margin-top: 5px; font-size: 24px;
  font-family: var(--mono); color: var(--accent);
}
.my-washes { margin-top: 16px; }
.my-washes-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.wash-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px;
  background: var(--panel-2); margin-bottom: 6px; font-size: 11px;
}
.wash-row code {
  font-family: var(--mono); color: var(--text); word-break: break-all;
  cursor: pointer;
}
.wash-row .wash-meta { color: var(--dim); margin-left: auto; }
.wash-row .tag {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.wash-row .tag.washmode { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
.wash-row .tag.used { color: var(--ok); border-color: rgba(127, 209, 168, .3); }
.wash-row .tag.expired { color: var(--err); border-color: rgba(239, 125, 125, .3); }
.wash-row .tag.off { color: var(--err); border-color: rgba(239, 125, 125, .3); }
/* 次数用完时：主按钮降级为中性灰，不保留醒目主色 */
#startWashBtn:disabled {
  cursor: not-allowed; opacity: 1;
  background: var(--panel-2); color: var(--dim);
  border-color: var(--line); box-shadow: none;
}

/* ---------- 宽屏布局优化 ---------- */
/* 统计条：宽屏下等分铺满，不挤在一侧 */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
@media (min-width: 760px) {
  .stat-row { grid-template-columns: repeat(6, 1fr); }
}
/* 卡片内容在宽屏下留出舒适行宽 */
@media (min-width: 1100px) {
  .wrap.wide .card { padding: 26px 28px; }
}
/* 管理端两栏布局：窄屏自动折叠为单栏 */
.admin-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
}
/* 双栏区块（已注册账号 / 二级后台账户） */
.duo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1000px) {
  .duo-grid { grid-template-columns: 1fr; }
}

/* 门禁内的次要卡片：更轻的视觉权重，不与主卡争视线 */
.gate-extras { padding: 20px 24px; background: var(--panel); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.gate-extras .app-bar { margin-top: 0; }
.gate-extras .group-bar { margin-top: 14px; }

/* ---------- VIP 等级（用户端账号中心） ---------- */
.vip-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0 4px;
}
.vip-line .vip-pts { font-size: 12px; color: var(--muted); }
.vip-line .vip-pts b { font-family: var(--mono); color: var(--accent); font-size: 14px; }
.vip-line .vip-gap { font-size: 11px; color: var(--dim); }
.vip-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--panel);
}
.vip-badge.lv1 { color: #c9b8e8; border-color: rgba(201,184,232,.4); background: rgba(201,184,232,.10); }
.vip-badge.lv2 { color: #9dc9e8; border-color: rgba(157,201,232,.4); background: rgba(157,201,232,.10); }
.vip-badge.lv3 { color: #7fd4b8; border-color: rgba(127,212,184,.4); background: rgba(127,212,184,.10); }
.vip-badge.lv4 { color: #e7c27d; border-color: rgba(231,194,125,.45); background: rgba(231,194,125,.12); }
.vip-badge.lv5 { color: #f0a58e; border-color: rgba(240,165,142,.5); background: rgba(240,165,142,.14); }

/* ---------- 用户管理：用户列表与等级进度 ---------- */
.u-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--panel-2); margin-bottom: 8px;
}
.u-main { flex: 1; min-width: 200px; }
.u-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.u-name b { font-size: 14px; font-weight: 600; color: var(--text); }
.u-meta { font-size: 11px; color: var(--dim); margin-top: 3px; }
.u-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 5px; }
.u-stats em { font-style: normal; font-family: var(--mono); color: var(--text); font-weight: 700; }
.u-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.u-acts .btn-sm { width: auto; }
.vip-bar { height: 5px; border-radius: 3px; background: var(--line-soft); overflow: hidden; margin-top: 7px; }
.vip-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #e7c27d, var(--accent)); }
.vip-scale { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.vip-scale span {
  font-size: 11px; color: var(--muted); padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: var(--panel-2);
}
.vip-scale span b { color: var(--accent); font-family: var(--mono); }
.pts-adjust { display: flex; gap: 6px; align-items: center; }
.pts-adjust input { width: 92px; }

/* ---------- 用户端：VIP 等级与特权注解（常驻） ---------- */
.vip-note {
  margin-bottom: 14px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-color: rgba(231,194,125,.22);
}
.vip-note-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.vip-note-title { font-size: 13px; font-weight: 600; color: #e7c27d; }
.vip-note-hint { font-size: 10.5px; color: var(--dim); }
.vip-note-intro { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.6; }
.vip-note-scale { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- VIP 等级刻度渐变：VIP1 古铜 -> VIP5 尊享金，横向连成一条渐进色带 ---------- */
.vip-note-lv,
.vip-scale span[data-lv] {
  --lv-g1: hsl(36, 22%, 21%);
  --lv-g2: hsl(36, 26%, 31%);
  --lv-bd: rgba(196, 170, 120, 0.20);
  --lv-bd-on: rgba(231, 194, 125, 0.60);
  --lv-t1: #d3bb8d;
  --lv-t2: #a68f65;
  --lv-glow: rgba(196, 170, 120, 0.14);
}
.vip-note-lv[data-lv="1"], .vip-scale span[data-lv="1"] {
  --lv-g1: hsl(36, 20%, 19%); --lv-g2: hsl(36, 25%, 29%);
  --lv-bd: rgba(196, 170, 120, 0.18); --lv-bd-on: rgba(214, 190, 140, 0.55);
  --lv-t1: #cbb68d; --lv-t2: #9d8a67; --lv-glow: rgba(196, 170, 120, 0.12);
}
.vip-note-lv[data-lv="2"], .vip-scale span[data-lv="2"] {
  --lv-g1: hsl(34, 25%, 21%); --lv-g2: hsl(34, 32%, 33%);
  --lv-bd: rgba(211, 178, 112, 0.22); --lv-bd-on: rgba(226, 196, 132, 0.60);
  --lv-t1: #dcc394; --lv-t2: #ab9163; --lv-glow: rgba(211, 178, 112, 0.16);
}
.vip-note-lv[data-lv="3"], .vip-scale span[data-lv="3"] {
  --lv-g1: hsl(32, 31%, 23%); --lv-g2: hsl(32, 40%, 36%);
  --lv-bd: rgba(225, 185, 105, 0.26); --lv-bd-on: rgba(238, 202, 128, 0.66);
  --lv-t1: #ecd09b; --lv-t2: #bd9d63; --lv-glow: rgba(225, 185, 105, 0.20);
}
.vip-note-lv[data-lv="4"], .vip-scale span[data-lv="4"] {
  --lv-g1: hsl(29, 39%, 25%); --lv-g2: hsl(28, 50%, 41%);
  --lv-bd: rgba(240, 186, 118, 0.32); --lv-bd-on: rgba(255, 205, 145, 0.72);
  --lv-t1: #f7dfae; --lv-t2: #d3aa6c; --lv-glow: rgba(240, 186, 118, 0.26);
}
.vip-note-lv[data-lv="5"], .vip-scale span[data-lv="5"] {
  --lv-g1: hsl(24, 46%, 27%); --lv-g2: hsl(19, 66%, 50%);
  --lv-bd: rgba(240, 160, 142, 0.36); --lv-bd-on: rgba(255, 188, 162, 0.78);
  --lv-t1: #ffd9bd; --lv-t2: #f0a08e; --lv-glow: rgba(240, 160, 142, 0.30);
}

.vip-note-lv {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  font-size: 11px; color: var(--muted);
  padding: 7px 11px; border-radius: 11px;
  border: 1px solid var(--lv-bd);
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.24), rgba(10, 11, 13, 0.58)),
    linear-gradient(135deg, var(--lv-g1), var(--lv-g2));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.vip-note-lv:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.vip-note-lv b { font-size: 12px; color: var(--lv-t1); font-weight: 700; letter-spacing: .3px; }
.vip-note-lv i { font-style: normal; font-family: var(--mono); color: var(--lv-t2); font-size: 10.5px; }
.vip-note-lv em { font-style: normal; color: var(--dim); font-size: 10px; max-width: 168px; white-space: normal; line-height: 1.45; }
.vip-note-lv.on {
  border-color: var(--lv-bd-on);
  box-shadow: 0 0 0 1px var(--lv-bd-on), 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 20px var(--lv-glow);
  transform: translateY(-1px);
}
.vip-note-lv.on b { color: #f3d9a4; }

/* 当前等级：一道流光从左扫到右 */
.vip-note-lv.on::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.20), transparent);
  transform: translateX(-130%);
  animation: vipShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes vipShimmer {
  0% { transform: translateX(-130%); }
  55% { transform: translateX(250%); }
  100% { transform: translateX(250%); }
}
@media (prefers-reduced-motion: reduce) {
  .vip-note-lv.on::after { display: none; animation: none; }
}

/* 等级名渐变文字（不支持时回落到纯色） */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .vip-note-lv b {
    background-image: linear-gradient(135deg, var(--lv-t1), var(--lv-t2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .vip-note-lv.on b { background-image: linear-gradient(135deg, #ffe6b4, var(--lv-t2)); }
}

/* 主后台用户管理页的 VIP 等级门槛刻度，同一套渐变 */
.vip-scale span[data-lv] {
  border: 1px solid var(--lv-bd);
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.20), rgba(10, 11, 13, 0.52)),
    linear-gradient(135deg, var(--lv-g1), var(--lv-g2));
  color: var(--lv-t1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.vip-scale span[data-lv] b { color: var(--lv-t2); }
.vip-note-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.vip-note-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 11.5px; color: var(--dim); }
.vip-note-row span { flex: 0 0 auto; }
.vip-note-row b { font-weight: 500; color: var(--muted); line-height: 1.6; }
.vip-note-mine {
  margin: 10px 0 0; padding: 7px 10px; border-radius: 9px;
  font-size: 11.5px; color: #e7c27d;
  background: rgba(231,194,125,.10); border: 1px solid rgba(231,194,125,.25);
}

/* ---------- 用户端：底部一行小字 ---------- */
.gate-foot {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--dim);
  margin-top: 2px; padding: 0 6px;
}
.gf-item {
  color: var(--dim); text-decoration: none; cursor: pointer;
  background: none; border: 0; padding: 0; font-size: 11.5px;
  font-family: inherit; transition: color .15s;
}
.gf-item:hover { color: var(--accent); }
.gf-sep { color: var(--line); }

/* ---------- 用户端：账号安全小行 ---------- */
.sec-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--dim);
}
.sec-link {
  color: var(--dim); text-decoration: none; cursor: pointer;
  background: none; border: 0; padding: 0; font-size: 11.5px; font-family: inherit;
  transition: color .15s;
}
.sec-link:hover { color: var(--accent); }

/* ---------- 用户端：卡密兑换区 ---------- */
.redeem-box {
  margin-top: 16px; padding: 14px 16px;
  border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--panel-2);
}
.redeem-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.redeem-title { font-size: 13px; font-weight: 600; color: var(--text); }
.redeem-note { font-size: 11px; color: var(--dim); }
.redeem-rules {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; font-size: 11px; color: var(--muted);
}
.redeem-rules b { color: var(--text); font-weight: 600; }
/* 兑换区：输入框占满整行，按钮另起一行，避免被挤扁 */
.redeem-box .code-row { display: block; }
.redeem-box .code-row input { width: 100%; }
.redeem-box .code-row .btn { width: 100%; margin-top: 8px; }
#redeemKey { min-width: 0; }

/* ---------- 用户端：VIP 周特权 ---------- */
.vip-perk {
  margin-top: 14px; padding: 13px 15px;
  border: 1px solid var(--accent-line); border-radius: 12px;
  background: linear-gradient(160deg, rgba(240,160,142,.07), var(--panel-2) 65%);
}
.vip-perk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.vip-perk-title { font-size: 13px; font-weight: 600; color: var(--text); }
.vip-perk-week { font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.vip-perk-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vip-perk-desc { flex: 1; min-width: 130px; font-size: 12px; color: var(--muted); line-height: 1.6; }
/* 领取按钮隐藏时不留空隙 */
.vip-perk-body .btn-sm[style*="display: none"] { display: none !important; }
.vip-perk-body .btn-sm { width: auto; flex: 0 0 auto; }
.perk-agent {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-soft);
}
.perk-agent-desc { font-size: 12px; color: var(--muted); line-height: 1.65; margin-bottom: 8px; }
.perk-agent .btn-sm { width: auto; }

.btn-block { width: 100%; }

/* 底部小字里的群号按钮：复制成功后高亮 */
.gate-foot .gf-item.copied, .sec-row .gf-item.copied { color: var(--ok); }

/* ---------- 账号绑定数量提示 ---------- */
.bind-slot {
  margin: 10px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.6;
}
.bind-slot:empty { display: none; }

/* 洗号模式选择：摸金 / 四队 / 两个都洗 */
.wash-mode-box { margin-top: 14px; }
.wash-mode-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: .5px; }
.wash-mode-opts { display: flex; gap: 8px; }
.wash-mode-opt {
  flex: 1; min-width: 0; cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 10px 4px; text-align: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .15s, background .15s, transform .1s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.wash-mode-opt:active { transform: scale(.98); }
.wash-mode-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.wash-mode-opt .wm-name { font-size: 13px; font-weight: 600; color: var(--text); }
.wash-mode-opt .wm-cost { font-size: 10.5px; color: var(--muted); }
.wash-mode-opt.on {
  border-color: var(--accent-line); background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.wash-mode-opt.on .wm-name { color: var(--accent); }
.wash-mode-opt.on .wm-cost { color: var(--accent); }
.wash-mode-hint { font-size: 10.5px; color: var(--dim); margin-top: 7px; line-height: 1.5; }

/* 开始洗号主按钮：账号中心的主操作，视觉上更醒目 */
.start-wash-cta {
  margin-top: 14px; padding: 13px 18px;
  font-size: 15px; font-weight: 600; letter-spacing: .3px;
}
.start-wash-cta:disabled {
  cursor: not-allowed; opacity: 1;
  background: var(--panel-2); color: var(--dim);
  border-color: var(--line); box-shadow: none;
}

/* 洗号记录里的卡密超链接：点击跳转洗号进度 */
.wash-row .wash-link {
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); text-decoration: none;
  cursor: pointer; word-break: break-all;
  border-bottom: 1px dashed var(--accent-line);
  transition: color .15s, border-color .15s;
}
.wash-row .wash-link:hover { color: var(--text); border-bottom-color: var(--text); }
.wash-row .wash-link:active { opacity: .7; }
.wash-row .wash-code-plain {
  font-family: var(--mono); color: var(--dim); word-break: break-all;
}
/* 已完成的洗号记录：可点击但用暗色区分 */
.wash-row .wash-link.done {
  color: var(--muted); border-bottom-color: var(--line);
}
.wash-row .wash-link.done:hover { color: var(--text); border-bottom-color: var(--dim); }
