/* =========================================================
   认证相关页面样式（登录 / 后台）
   ========================================================= */

:root {
  --bg: #07070b;
  --panel: #0f0f17;
  --panel-2: #14141d;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #f2f3f7;
  --text-2: #c7cad3;
  --muted: #8b91a1;
  --cyan: #25f4ee;
  --red: #fe2c55;
  --ok: #33d69f;
  --grad: linear-gradient(105deg, #25f4ee, #6d8bff 46%, #fe2c55);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }
svg { display: block; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }

/* 背景光效 */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.bg-glow.a {
  width: 520px; height: 520px;
  top: -240px; left: 50%;
  transform: translateX(-80%);
  background: radial-gradient(circle, rgba(37, 244, 238, 0.32), transparent 68%);
}
.bg-glow.b {
  width: 480px; height: 480px;
  top: -180px; left: 50%;
  transform: translateX(20%);
  background: radial-gradient(circle, rgba(254, 44, 85, 0.28), transparent 70%);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------------------------- 顶部 ---------------------------- */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 26px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(150deg, rgba(37, 244, 238, 0.22), rgba(254, 44, 85, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cyan);
}
.brand-mark svg { width: 17px; height: 17px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang-btn, .ghost-btn {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: 0.18s ease;
}
.lang-btn:hover, .ghost-btn:hover {
  color: var(--text);
  border-color: rgba(37, 244, 238, 0.5);
}

/* ---------------------------- 登录卡片 ---------------------------- */
.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 22px 60px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 30px 28px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(37, 244, 238, 0.08), transparent 55%),
    radial-gradient(120% 120% at 100% 0%, rgba(254, 44, 85, 0.07), transparent 55%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.lock-badge {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: rgba(37, 244, 238, 0.1);
  border: 1px solid rgba(37, 244, 238, 0.22);
  color: var(--cyan);
  margin-bottom: 18px;
}
.lock-badge svg { width: 21px; height: 21px; }
.auth-card.admin-mode .lock-badge {
  color: #ff8399;
  background: rgba(254, 44, 85, 0.12);
  border-color: rgba(254, 44, 85, 0.26);
}

.auth-card h1 { font-size: 22px; font-weight: 750; }
.auth-card .sub { margin-top: 7px; color: var(--muted); font-size: 13.5px; }

/* 表单 */
.field { margin-top: 18px; }
.field:first-of-type { margin-top: 24px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  transition: 0.18s ease;
}
.input-wrap:focus-within {
  border-color: rgba(37, 244, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 244, 238, 0.09);
  background: rgba(255, 255, 255, 0.05);
}
.input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 40px 12px 14px;
  font-size: 14.5px;
  letter-spacing: 0.04em;
}
.input-wrap input::placeholder { color: #63697a; letter-spacing: 0; }

.eye-btn {
  position: absolute;
  right: 6px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--muted);
  transition: 0.15s;
}
.eye-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.eye-btn svg { width: 17px; height: 17px; }

.btn-primary {
  width: 100%;
  margin-top: 20px;
  padding: 13px;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(135deg, #fe2c55, #ff5f7e 55%, #ff8a6b);
  box-shadow: 0 12px 28px -12px rgba(254, 44, 85, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: 0.16s ease;
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { transform: none; }
.btn-primary[disabled] { cursor: progress; filter: saturate(0.7) brightness(0.92); }

.btn-ghost {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--text-2);
  border: 1px solid var(--line-2);
  transition: 0.16s;
}
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.spinner {
  display: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.is-loading .spinner { display: block; }

/* 提示条 */
.alert {
  display: none;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert.show { display: flex; }
.alert.error {
  background: rgba(254, 44, 85, 0.1);
  border-color: rgba(254, 44, 85, 0.3);
  color: #ff9aac;
}
.alert.ok {
  background: rgba(51, 214, 159, 0.1);
  border-color: rgba(51, 214, 159, 0.3);
  color: #6ee7bd;
}
.alert svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.shake { animation: shake 0.36s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
}

.auth-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #6b7181;
}
.auth-foot a { color: var(--text-2); transition: color 0.16s; }
.auth-foot a:hover { color: var(--cyan); }

/* ---------------------------- 后台页 ---------------------------- */
.admin-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 6px 22px 70px;
}
.admin-head { margin-bottom: 22px; }
.admin-head h1 { font-size: 26px; font-weight: 780; letter-spacing: -0.03em; }
.admin-head p { margin-top: 6px; color: var(--muted); font-size: 13.5px; }

.panel {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  padding: 22px;
  margin-bottom: 14px;
}
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.panel-head h2 { font-size: 16px; font-weight: 680; }
.tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.tag.on { background: rgba(51, 214, 159, 0.14); color: #6ee7bd; }
.tag.off { background: rgba(254, 44, 85, 0.14); color: #ff8399; }
.panel .desc { color: var(--muted); font-size: 13px; margin-top: 6px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel .btn-primary { margin-top: 16px; }

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.status-row:last-child { border-bottom: 0; padding-bottom: 0; }
.status-row .k { color: var(--muted); }
.status-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }

.note {
  font-size: 12.5px;
  color: #6b7181;
  line-height: 1.7;
  border-left: 2px solid rgba(255, 194, 75, 0.4);
  padding-left: 12px;
  margin-top: 16px;
}
.note code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 5px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: var(--text-2);
}

@media (max-width: 640px) {
  .auth-card { padding: 26px 20px 22px; border-radius: 18px; }
  .grid2 { grid-template-columns: 1fr; }
  .admin-head h1 { font-size: 22px; }
  .panel { padding: 18px; }
}
