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

html, body {
  height: 100%;
  font-family: 'Noto Sans SC', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
}

/* ── 视频背景 ──────────────────────────────────────────────────────────── */
.bg-video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #1a2340;
}

/* 备用渐变（视频加载前 / 不可用时） */
.bg-video-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #1a2a4a 0%, #0f1e36 50%, #151f38 100%);
}

.bg-video {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 30, 0.42);
}

/* ── 居中容器 ──────────────────────────────────────────────────────────── */
.page-center {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 60px;
}

/* ── 登录卡片 ───────────────────────────────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 400px;
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(220, 230, 255, 0.13) 40%,
    rgba(190, 210, 255, 0.08) 100%
  );
  backdrop-filter: blur(40px) saturate(200%) brightness(1.08);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.08);
  border-radius: 24px;
  padding: 44px 44px 36px;
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.50),
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.18),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.50),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    inset 1px 0 0 rgba(255, 255, 255, 0.12),
    inset -1px 0 0 rgba(255, 255, 255, 0.06);
  animation: cardIn .45s cubic-bezier(.22,1,.36,1) both;
  overflow: hidden;
}

/* 顶部高光条 */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.70) 30%,
    rgba(255,255,255,0.90) 50%,
    rgba(255,255,255,0.70) 70%,
    transparent 100%
  );
  border-radius: 0 0 4px 4px;
}

/* 内部光晕 */
.login-card::after {
  content: '';
  position: absolute;
  top: -40%; left: -20%;
  width: 140%; height: 70%;
  background: radial-gradient(ellipse at 50% 0%,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.04) 45%,
    transparent 70%
  );
  pointer-events: none;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── 卡片 Logo ─────────────────────────────────────────────────────────── */
.card-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.card-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245,158,11,0.30);
}

.card-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.2px;
}

/* ── 表单头部 ──────────────────────────────────────────────────────────── */
.form-head   { margin-bottom: 22px; }
.form-title  { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -0.4px; margin-bottom: 4px; text-shadow: 0 1px 8px rgba(0,0,0,0.3); }
.form-desc   { font-size: 13px; color: rgba(255,255,255,0.50); line-height: 1.55; }
.form-footer { margin-top: 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.28); }

/* ── 字段 ──────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.2px;
}

.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.30);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.input-icon svg { width: 16px; height: 16px; }

.field input {
  width: 100%;
  padding: 11px 13px 11px 38px;
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.13);
}
.field input:focus {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.field input::placeholder { color: rgba(255, 255, 255, 0.22); }

/* ── 错误提示 ──────────────────────────────────────────────────────────── */
.error-msg {
  display: none;
  margin-bottom: 12px;
  padding: 9px 13px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.30);
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.5;
}
.error-msg.show { display: block; animation: shake .28s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-5px); }
  75%     { transform: translateX(5px); }
}

/* ── 提交按钮（与输入框同色系玻璃态） ──────────────────────────────────── */
.btn-submit {
  width: 100%;
  padding: 13px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s, border-color .18s, box-shadow .18s, color .18s;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  letter-spacing: 2px;
}
.btn-submit:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.18),
    0 0 0 3px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.40);
}
.btn-submit:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.26);
  box-shadow:
    0 1px 6px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-submit:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── 骨架屏 ────────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.06) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── 成功状态 ──────────────────────────────────────────────────────────── */
.success-view { display: none; text-align: center; padding: 8px 0; }
.success-view.show { display: block; animation: fadeUp .4s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.success-icon  { font-size: 44px; margin-bottom: 12px; }
.success-title { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 6px; text-shadow: 0 1px 8px rgba(0,0,0,0.3); }
.success-desc  { font-size: 13px; color: rgba(255,255,255,0.50); }

.redirect-bar {
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 20px;
}
.redirect-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 2px;
  transition: width 1.2s linear;
}

/* ── Spinner ───────────────────────────────────────────────────────────── */
.spin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: rotate .6s linear infinite;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
@keyframes rotate { to { transform: rotate(360deg); } }

/* ── 左上角品牌标识 ─────────────────────────────────────────────────────── */
.top-brand {
  position: fixed;
  top: 24px;
  left: 28px;
  z-index: 10;
  animation: fadeDown .5s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .1s;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.top-brand-name {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

/* ── 底部备案号 ─────────────────────────────────────────────────────────── */
.page-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.38);
  background: rgba(0,0,0,0.20);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: .3px;
  z-index: 10;
}
.page-footer a { color: inherit; text-decoration: none; transition: color .2s; }
.page-footer a:hover { color: rgba(255,255,255,0.70); }
.footer-divider { opacity: 0.35; }

/* ── 响应式 ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px 28px;
    border-radius: 14px;
  }
  .form-title { font-size: 19px; }
}

/* ══════════════════════════════════════════════════════════════════════
   暗色主题：更深的玻璃蓝调
══════════════════════════════════════════════════════════════════════ */
[data-theme="dark"] .login-card {
  background: linear-gradient(
    145deg,
    rgba(40, 55, 110, 0.52) 0%,
    rgba(20, 28, 70, 0.42) 50%,
    rgba(12, 18, 50, 0.35) 100%
  );
  border-color: rgba(255,255,255,0.12);
  box-shadow:
    0 32px 80px rgba(0,0,0,0.70),
    0 8px 32px rgba(0,0,0,0.45),
    0 2px 8px rgba(0,0,0,0.30),
    inset 0 1.5px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(255,255,255,0.04),
    inset 1px 0 0 rgba(255,255,255,0.07),
    inset -1px 0 0 rgba(255,255,255,0.03);
}
