/* ============================================================
   REC ADM — 登录页样式（深空玻璃态）
   独立文件，只作用于 /adm/login，不影响后台内页
   ============================================================ */

:root {
  --bg-0: #05060b;
  --bg-1: #0a0d18;
  --glass-bg: rgba(20, 24, 40, 0.55);
  --glass-brd: rgba(140, 160, 255, 0.16);
  --glass-brd-hi: rgba(150, 170, 255, 0.34);
  --txt-0: #eef1ff;
  --txt-1: #9aa4c8;
  --txt-2: #6b7496;
  --acc-1: #5b7cfa;
  --acc-2: #9b5bfa;
  --acc-3: #4fd1ff;
  --err: #ff6b8a;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.login-page {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
               "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg-0);
  color: var(--txt-0);
  -webkit-font-smoothing: antialiased;
}

/* ── 背景光晕层 ───────────────────────────── */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(91,124,250,0.20), transparent 62%),
    radial-gradient(1000px 620px at 85% 88%, rgba(155,91,250,0.18), transparent 60%),
    radial-gradient(760px 520px at 55% 50%, rgba(79,209,255,0.07), transparent 65%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
}

/* 细微网格纹理 */
.bg-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140,160,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,160,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
}

/* 漂浮光斑 */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}
.orb.a {
  width: 420px; height: 420px;
  left: -120px; top: -100px;
  background: radial-gradient(circle, rgba(91,124,250,0.75), transparent 68%);
  animation-delay: 0s;
}
.orb.b {
  width: 480px; height: 480px;
  right: -160px; bottom: -140px;
  background: radial-gradient(circle, rgba(155,91,250,0.62), transparent 68%);
  animation-delay: -6s;
}
.orb.c {
  width: 320px; height: 320px;
  right: 22%; top: 12%;
  background: radial-gradient(circle, rgba(79,209,255,0.42), transparent 70%);
  animation-delay: -11s;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(28px, -34px, 0) scale(1.07); }
  66%      { transform: translate3d(-22px, 26px, 0) scale(0.95); }
}

/* ── 布局 ─────────────────────────────────── */
.login-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ── 玻璃卡片 ─────────────────────────────── */
.login-box {
  width: 100%;
  max-width: 404px;
  padding: 38px 34px 30px;
  margin: 0 auto;
  flex: 0 0 auto;
  border-radius: 22px;

  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);

  box-shadow:
    0 28px 80px -20px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;

  animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
  overflow: hidden;
}

/* 卡片顶部高光条 */
.login-box::before {
  content: "";
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(150,175,255,0.55), transparent);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── 标题 ─────────────────────────────────── */
.login-box h1 {
  margin: 0 0 30px;
  text-align: center;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: 0.2px;
  background: linear-gradient(120deg, #ffffff 0%, #c6d0ff 55%, #a68cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── 表单 ─────────────────────────────────── */
.login-box label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: var(--txt-1);
  font-weight: 500;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  height: 46px;
  margin: 0 0 18px;
  padding: 0 14px;
  border-radius: 11px;

  background: rgba(10, 13, 26, 0.72);
  border: 1px solid rgba(140,160,255,0.14);
  color: var(--txt-0);
  font-size: 14px;
  font-family: inherit;
  outline: none;

  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-box input::placeholder { color: var(--txt-2); }

.login-box input[type="text"]:hover,
.login-box input[type="password"]:hover {
  border-color: rgba(140,160,255,0.26);
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
  border-color: rgba(110,135,255,0.72);
  background: rgba(12, 16, 32, 0.92);
  box-shadow:
    0 0 0 3px rgba(91,124,250,0.16),
    0 0 24px -4px rgba(91,124,250,0.55);
}

/* 自动填充修正 */
.login-box input:-webkit-autofill,
.login-box input:-webkit-autofill:hover,
.login-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--txt-0);
  -webkit-box-shadow: 0 0 0 1000px rgba(12,16,32,0.98) inset;
  transition: background-color 9999s ease-in-out 0s;
  border-color: rgba(110,135,255,0.5);
}

/* ── 按钮 ─────────────────────────────────── */
.login-box button[type="submit"],
.login-box button {
  width: 100%;
  height: 47px;
  margin-top: 6px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;

  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 1.6px;
  color: #fff;
  font-family: inherit;

  background: linear-gradient(120deg, var(--acc-1) 0%, #7a5bfa 52%, var(--acc-2) 100%);
  background-size: 180% 100%;
  background-position: 0% 50%;

  box-shadow:
    0 10px 28px -10px rgba(91,124,250,0.85),
    0 1px 0 rgba(255,255,255,0.22) inset;

  transition: transform .16s ease, box-shadow .16s ease, background-position .5s ease;
}

.login-box button:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow:
    0 16px 38px -10px rgba(120,95,250,0.95),
    0 1px 0 rgba(255,255,255,0.28) inset;
}

.login-box button:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px -8px rgba(91,124,250,0.8);
}

.login-box button:focus-visible {
  outline: 2px solid rgba(150,175,255,0.8);
  outline-offset: 2px;
}

/* ── 错误提示 ─────────────────────────────── */
.login-box .err {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  color: #ffd7e0;
  background: rgba(255, 90, 130, 0.11);
  border: 1px solid rgba(255, 107, 138, 0.34);
  box-shadow: 0 0 22px -8px rgba(255,107,138,0.6);
}

/* ── 小屏适配 ─────────────────────────────── */
@media (max-width: 480px) {
  .login-box { padding: 32px 22px 26px; border-radius: 18px; }
  .login-box h1 { font-size: 22px; }
  .orb.a, .orb.b, .orb.c { filter: blur(58px); }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
  .login-box { animation: none; }
  .login-box button:hover { transform: none; }
}

/* ══════════════════════════════════════════════
   登录验证码
   ══════════════════════════════════════════════ */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.captcha-row input[type="text"] {
  flex: 1 1 auto;
  width: auto !important;
  margin: 0 !important;
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
}
.captcha-row img {
  flex: 0 0 auto;
  width: 120px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid rgba(140,160,255,0.18);
  cursor: pointer;
  background: #eef2f8;
  transition: border-color .14s ease, box-shadow .14s ease;
  display: block;
  user-select: none;
}
.captcha-row img:hover {
  border-color: rgba(110,135,255,0.65);
  box-shadow: 0 0 0 3px rgba(91,124,250,0.14);
}
