﻿:root {
  --bg: #121212;
  --panel: #181818;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f5;
  --muted: #a7a7a7;
  --accent: #e11d48;
  --ok: #34d399;
  --danger: #fb7185;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Outfit", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
body.page-auth {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(700px 320px at 15% -10%, rgba(225, 29, 72, 0.16), transparent 55%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

body.page-auth .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.92);
}
body.page-auth .brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; }
body.page-auth .brand-badge {
  width: 1.7rem; height: 1.7rem; border-radius: 0.45rem;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #fb7185, var(--accent));
  font-size: 0.85rem;
}
body.page-auth .nav { display: flex; gap: 1rem; color: var(--muted); font-size: 0.92rem; }
body.page-auth .nav a:hover { color: var(--text); }
.auth-links { display: flex; gap: 0.85rem; color: var(--muted); font-size: 0.9rem; }
.auth-links a.is-active, .auth-links a:hover { color: var(--text); }

.auth-wrap {
  width: min(100% - 2rem, 420px);
  margin: 4rem auto;
  padding: 1.6rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.auth-wrap h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
}
.auth-wrap .lede {
  margin: 0.55rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.field { margin-bottom: 0.9rem; }
.field label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101010;
  color: var(--text);
  padding: 0.75rem 0.85rem;
  outline: none;
}
.field input:focus { border-color: rgba(225, 29, 72, 0.55); }
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.15rem 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
}
.check-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.otp-row {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
}
.otp-row input { flex: 1; min-width: 0; }
.btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #fb7185, var(--accent));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}
.btn-ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-ghost:hover:not(:disabled) {
  border-color: rgba(225, 29, 72, 0.45);
  background: rgba(225, 29, 72, 0.1);
}
.msg {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--danger);
}
.msg.ok { color: var(--ok); }
.switch {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.switch a { color: #fda4af; }

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.side {
  border-right: 1px solid var(--line);
  background: #151515;
  padding: 1.2rem 0.9rem;
}
.side h1 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.side .sub { margin: 0 0 1.2rem; color: var(--muted); font-size: 0.8rem; }
.side nav { display: flex; flex-direction: column; gap: 0.25rem; }
.side button, .side a.navbtn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
}
.side button.is-active, .side button:hover, .side a.navbtn:hover {
  background: rgba(225, 29, 72, 0.12);
  color: var(--text);
}
.main { padding: 1.25rem 1.4rem 2rem; }
.main-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.main-head h2 { margin: 0; font-size: 1.35rem; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 0.9rem 1rem;
}
.stat .k { color: var(--muted); font-size: 0.82rem; }
.stat .v { margin-top: 0.35rem; font-size: 1.4rem; font-weight: 700; }
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: auto;
  margin-bottom: 1rem;
}
.panel h3 {
  margin: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
th, td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th { color: var(--muted); font-weight: 500; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-size: 0.75rem;
}
.badge.ok { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.badge.bad { background: rgba(251, 113, 133, 0.15); color: var(--danger); }
.mini {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  margin-right: 0.25rem;
}
.mini.danger { color: var(--danger); border-color: rgba(251,113,133,0.35); }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr 1fr; }
}


