:root {
  --bg: #0b1020;
  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef2ff;
  --muted: #9aa4c7;
  --accent: #7c6cff;
  --accent2: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* ---------- 背景装饰 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(124, 108, 255, 0.28), transparent 60%),
    radial-gradient(800px 500px at 110% 20%, rgba(34, 211, 238, 0.16), transparent 55%),
    radial-gradient(700px 700px at 50% 120%, rgba(124, 108, 255, 0.12), transparent 60%),
    var(--bg);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 14s ease-in-out infinite;
}

.b1 { width: 340px; height: 340px; background: #7c6cff; top: -120px; left: -100px; }
.b2 { width: 260px; height: 260px; background: #22d3ee; top: 30%; right: -120px; animation-delay: -5s; }
.b3 { width: 220px; height: 220px; background: #fb7185; bottom: -80px; left: 20%; animation-delay: -9s; opacity: 0.3; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.06); }
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 720px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(124, 108, 255, 0.8));
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  font-size: 12.5px;
  color: var(--ok);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s infinite;
}

.status-pill.offline {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--warn);
}

.status-pill.offline .dot {
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- 视图切换 ---------- */
.view {
  display: none;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 20px 40px;
}

.view.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 首页 ---------- */
.hero {
  text-align: center;
  padding: 34px 8px 26px;
}

.hero h1 {
  font-size: clamp(26px, 5.6vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(90deg, #fff, #c7d2fe 55%, var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 14px auto 26px;
  max-width: 520px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 16px 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 38px rgba(124, 108, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 46px rgba(124, 108, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary.small {
  padding: 12px 22px;
  font-size: 15px;
  border-radius: 13px;
}

.btn-icon {
  font-size: 20px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.warn {
  margin-top: 18px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--warn);
  font-size: 13px;
  line-height: 1.6;
}

.warn.small {
  margin-top: 12px;
  font-size: 12px;
  padding: 9px 12px;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-head h2 {
  font-size: 17px;
  font-weight: 700;
}

.card-hint {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  padding: 5px 11px;
  border-radius: 999px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.pf-card {
  --pc: #94a3b8;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.pf-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--pc) 55%, transparent);
}

.pf-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 21px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--pc) 18%, transparent);
}

.pf-name {
  font-size: 14px;
  font-weight: 700;
}

.pf-tag {
  font-size: 11.5px;
  color: var(--muted);
}

.pf-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-top: 2px;
}

.pf-status.ok { color: var(--ok); }
.pf-status.busy { color: var(--warn); }

.pf-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.step-no {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.steps b {
  font-size: 14.5px;
}

.steps p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.55;
}

.foot {
  text-align: center;
  padding: 26px 8px 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

/* ---------- 扫码页 ---------- */
.scan-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.scan-title {
  font-size: 17px;
  font-weight: 700;
}

.scan-plats {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-icon-only:hover {
  background: var(--card-strong);
}

.camera-box {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: 62vh;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #05070f;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.camera-box video,
.camera-box canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewfinder {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 72%;
  height: 55%;
  max-width: 320px;
}

.corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid rgba(34, 211, 238, 0.9);
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8));
}

.corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 10px 0 0 0; }
.corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 10px 0 0; }
.corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 10px; }
.corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 10px 0; }

.scanline {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.95), transparent);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.9);
  animation: scan 2.4s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { top: 0; opacity: 0.4; }
  50% { top: calc(100% - 3px); opacity: 1; }
}

.scan-error {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
  font-size: 13px;
  line-height: 1.55;
  z-index: 5;
}

.scan-hint {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin: 16px 0 14px;
  line-height: 1.6;
}

.scan-hint b {
  color: var(--text);
}

.scan-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: var(--card-strong);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost.small {
  padding: 11px 20px;
  font-size: 14px;
}

.btn-demo {
  display: block;
  width: 100%;
  margin: 14px auto 0;
  padding: 12px;
  border-radius: 13px;
  border: 1px dashed rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.07);
  color: #a5f3fc;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-demo:hover {
  background: rgba(34, 211, 238, 0.14);
}

.manual-box {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  padding: 12px 14px;
}

.manual-box summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--muted);
  outline: none;
}

.manual-box summary:hover {
  color: var(--text);
}

.manual-row {
  display: flex;
  gap: 9px;
  margin-top: 11px;
}

.manual-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
}

.manual-row input:focus {
  border-color: var(--accent);
}

.btn-small {
  padding: 10px 18px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel {
  display: block;
  margin: 16px auto 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  padding: 6px 14px;
}

.btn-cancel:hover {
  color: var(--danger);
}

/* ---------- 结果页 ---------- */
.result-card {
  --pc: #94a3b8;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn 0.35s ease;
}

.result-card.center {
  text-align: center;
  padding: 44px 22px;
}

.result-card.center h3 {
  margin-top: 14px;
  font-size: 19px;
}

.muted {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
  margin-top: 8px;
}

.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.qr-meta {
  margin-top: 16px;
  padding: 9px 13px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.big-icon {
  font-size: 46px;
}

.badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.badge-platform {
  --pc: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  background: color-mix(in srgb, var(--pc) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--pc) 45%, transparent);
  color: var(--text);
}

.badge-qr {
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 11px;
  border-radius: 999px;
}

.account-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: none;
}

.row-label {
  font-size: 12.5px;
  color: var(--muted);
}

.row-value {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13.5px;
  color: #dbe4ff;
  word-break: break-all;
}

.row.note {
  grid-template-columns: 52px minmax(0, 1fr);
}

.row-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.copy-btn {
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ttl-line {
  margin-top: 15px;
  font-size: 12.5px;
  color: var(--muted);
}

.ttl-line b {
  color: var(--accent2);
  font-variant-numeric: tabular-nums;
}

.login-track {
  margin-top: 14px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.login-progress {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px rgba(124, 108, 255, 0.7);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-text {
  margin-top: 11px;
  font-size: 13.5px;
  color: var(--muted);
  min-height: 20px;
}

.success-box {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(52, 211, 153, 0.09);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.success-box b {
  font-size: 18px;
  color: var(--ok);
}

.success-box span {
  font-size: 12.5px;
  color: var(--muted);
}

.ring {
  width: 78px;
  height: 78px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 5;
}

.ring-fg {
  fill: none;
  stroke: var(--ok);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 214;
  stroke-dashoffset: 214;
  animation: ringIn 0.8s ease-out forwards;
}

.ring-check {
  fill: none;
  stroke: var(--ok);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: checkIn 0.45s 0.55s ease-out forwards;
}

@keyframes ringIn {
  to { stroke-dashoffset: 0; }
}

@keyframes checkIn {
  to { stroke-dashoffset: 0; }
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(24px);
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(20, 26, 46, 0.95);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 99;
  max-width: min(88vw, 460px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.warn {
  border-color: rgba(251, 191, 36, 0.5);
}

/* ---------- 小屏适配 ---------- */
@media (max-width: 480px) {
  .topbar { padding: 14px 16px; }
  .brand-sub { display: none; }
  .view { padding: 4px 16px 32px; }
  .hero { padding: 26px 4px 20px; }
  .hero-stats { gap: 26px; }
  .row { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 8px; }
  .row.note { grid-template-columns: 46px minmax(0, 1fr); }
}

/* ---------- 手机访问卡片 ---------- */
.lan-tip {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

.lan-box {
  display: flex;
  gap: 18px;
  align-items: center;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
}

.lan-qr {
  flex: 0 0 auto;
  width: 128px;
  height: 128px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lan-qr img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.lan-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.lan-label {
  font-size: 12px;
  color: var(--ok);
  font-weight: 600;
}

.lan-label.alt {
  color: var(--muted);
  margin-top: 8px;
  font-weight: 400;
}

.lan-url {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13.5px;
  color: #dbe4ff;
  word-break: break-all;
}

.lan-url.muted {
  color: var(--muted);
}

.lan-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.lan-note b {
  color: var(--text);
}

.link-btn {
  margin-top: 10px;
  border: none;
  background: none;
  color: var(--accent2);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  text-decoration: underline;
}

.link-btn:hover {
  color: #a5f3fc;
}

/* ---------- 结果页徽章 ---------- */
.badge-qr.match {
  color: var(--ok);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-qr.mismatch {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* ---------- 登录指引 ---------- */
.guidance {
  margin-top: 16px;
  padding: 15px 16px;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

.guidance-head {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #a5f3fc;
}

.guidance ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.guidance li {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.guidance li b {
  color: var(--text);
}

/* ---------- 账号管理 ---------- */
.admin-login h2 {
  font-size: 17px;
  margin-bottom: 6px;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-form select,
.admin-form input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
}

.admin-form select:focus,
.admin-form input:focus {
  border-color: var(--accent);
}

.admin-form select option {
  background: #12182b;
  color: var(--text);
}

.admin-form .btn-primary.small {
  grid-column: 1 / -1;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
}

.admin-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-item-name {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.admin-item-acc {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.badge-demo {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.badge-busy {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  color: var(--warn);
}

.btn-small.danger {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
  flex: 0 0 auto;
}

.btn-small.danger:hover {
  background: rgba(248, 113, 113, 0.25);
}

.btn-small.danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .lan-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .lan-info {
    align-items: center;
  }
  .admin-form {
    grid-template-columns: 1fr;
  }
}

/* ---------- 额度卡片 ---------- */
.quota-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.16), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(124, 108, 255, 0.35);
  box-shadow: var(--shadow);
}

.quota-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.quota-label {
  font-size: 13px;
  color: var(--muted);
}

.quota-num {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.35);
}

.btn-copy-both {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(124, 108, 255, 0.5);
  background: rgba(124, 108, 255, 0.08);
  color: #c7d2fe;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-copy-both:hover {
  background: rgba(124, 108, 255, 0.16);
}

@media (max-width: 480px) {
  .quota-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .quota-left {
    align-items: center;
    text-align: center;
  }
}

/* ---------- 校验码登录 ---------- */
.login-card {
  max-width: 440px;
  margin: 40px auto 0;
  text-align: center;
  padding: 34px 26px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn 0.35s ease;
}

.login-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 38px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.25), rgba(34, 211, 238, 0.18));
  border: 1px solid rgba(124, 108, 255, 0.4);
}

.login-card h1 {
  font-size: 22px;
  font-weight: 800;
}

.login-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.login-row input {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.login-row input:focus {
  border-color: var(--accent);
}

.login-row .btn-primary {
  padding: 13px 26px;
  font-size: 15px;
  white-space: nowrap;
}

.login-msg {
  margin-top: 13px;
  min-height: 20px;
  font-size: 13px;
  color: var(--ok);
}

.login-msg.warn {
  color: var(--danger);
}

/* ---------- 校验码管理 ---------- */
.code-gen {
  grid-template-columns: 1fr 130px;
}

.gen-label {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
}

.new-code {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.35);
  text-align: center;
}

.new-code-label {
  font-size: 12.5px;
  color: var(--muted);
}

.new-code-value {
  margin: 10px auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--ok);
  user-select: all;
}

.admin-item-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.code-logins {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.code-login-line {
  font-size: 11.5px;
  color: var(--muted);
}

@media (max-width: 480px) {
  .login-card {
    margin: 24px 0 0;
    padding: 28px 18px;
  }
  .code-gen {
    grid-template-columns: 1fr;
  }
  .new-code-value {
    font-size: 24px;
    letter-spacing: 3px;
  }
}

/* ---------- 平台选择 ---------- */
.pf-card.selectable {
  cursor: pointer;
}

.pf-card.selectable:hover {
  transform: translateY(-2px);
}

.pf-card.selected {
  border-color: var(--accent);
  background: rgba(124, 108, 255, 0.16);
  box-shadow: 0 0 0 2px rgba(124, 108, 255, 0.4);
}

.pf-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pf-card.disabled:hover {
  transform: none;
}

/* ---------- 后台账号分组 ---------- */
.admin-group {
  margin-bottom: 14px;
}

.admin-group-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-group .admin-item {
  margin-bottom: 8px;
}
