:root {
  --bg: #0f172a;
  --bg2: #1e293b;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --brand: #6366f1;
  --brand2: #22d3ee;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 70% -10%, #312e81 0%, transparent 60%),
    radial-gradient(900px 500px at 10% 110%, #0e7490 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.center-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}
.subtitle { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }

input, select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
input:focus, select:focus { border-color: var(--brand); }

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  transition: transform 0.15s ease, opacity 0.15s ease;
}
button:hover { transform: translateY(-1px); opacity: 0.95; }
button.ghost { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); }
button.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }
button.small { padding: 6px 10px; font-size: 12px; }

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

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

/* 右下角注册码登录 */
.corner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 280px;
  z-index: 50;
}
.corner .card { padding: 18px; }
.corner .title { font-size: 15px; }

/* 后台布局 */
.admin { max-width: 1100px; margin: 0 auto; padding: 24px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button.ghost.active { background: var(--brand); border-color: var(--brand); }
.panel { display: none; }
.panel.active { display: block; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.badge { padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge.ok { background: rgba(34,197,94,0.15); color: var(--ok); }
.badge.warn { background: rgba(245,158,11,0.15); color: var(--warn); }
.badge.err { background: rgba(239,68,68,0.15); color: var(--err); }
.badge.muted { background: rgba(148,163,184,0.15); color: var(--muted); }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1; min-width: 120px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .corner { width: calc(100% - 40px); } }
.code-cell { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; }
