/* ============================================================
   登录页 · 毛玻璃 / 左侧 2/5 面板
   ============================================================ */

:root {
  --ink: #0f172a;
  --ink-soft: #4a5670;
  --ink-mute: #77839a;
  --brand: #2563eb;
  --brand-2: #3b82f6;
  --line: rgba(15, 23, 42, 0.13);
  --radius: 12px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- 背景 ---------- */
.scene {
  position: fixed;
  inset: 0;
  background-image: url("bg.jpg");
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
  background-color: #1b2a3d;
}

/* 给画面压一点层次，毛玻璃边缘才立得住 */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 82% 18%, rgba(255, 255, 255, 0) 0%, rgba(9, 20, 38, 0.32) 100%),
    linear-gradient(90deg, rgba(9, 20, 38, 0.16) 0%, rgba(9, 20, 38, 0) 42%);
  pointer-events: none;
}

/* ---------- 玻璃面板 ---------- */
.glass {
  position: relative;
  z-index: 2;
  width: 40%;
  height: 100%;
  padding: 0 clamp(30px, 4.2vw, 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.34) 100%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  backdrop-filter: blur(24px) saturate(165%);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.62),
    36px 0 80px rgba(8, 20, 40, 0.20);
  overflow-y: auto;
  animation: panel-in 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}

.panel-inner {
  width: 100%;
  max-width: 344px;
  margin: 0 auto;
}

/* ---------- 品牌 ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(28px, 5vh, 46px);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(140deg, #4f8cff, #2563eb 62%, #1d4ed8);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark svg { width: 21px; height: 21px; display: block; }

.brand-name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--ink);
}

/* ---------- 标题 ---------- */
h1 {
  margin: 0 0 22px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--ink);
}

/* ---------- 表单 ---------- */
.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.2px;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field input::placeholder { color: #9aa6b8; }

.field input:hover { background: rgba(255, 255, 255, 0.9); }

.field input:focus {
  background: #fff;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.18);
}

.submit {
  width: 100%;
  height: 48px;
  margin-top: 10px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
  transition: transform 0.08s, box-shadow 0.15s, filter 0.15s;
}

.submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
}

.submit:active { transform: translateY(1px); }

.submit:disabled { opacity: 0.65; cursor: default; }

/* 提示条 */
.tip {
  display: none;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  padding: 9px 12px;
  font-size: 12.5px;
  border-radius: 9px;
  line-height: 1.45;
}

.tip.show { display: flex; }

.tip.bad {
  color: #9a1b1b;
  background: rgba(254, 226, 226, 0.75);
  border: 1px solid rgba(220, 38, 38, 0.28);
}

.tip.ok {
  color: #14603a;
  background: rgba(220, 252, 231, 0.75);
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.tip svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* ---------- 窄屏：面板铺满 ---------- */
@media (max-width: 860px) {
  .glass {
    width: 100%;
    padding: 0 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.58) 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5);
  }
  .scene::after {
    background: radial-gradient(120% 80% at 50% 10%, rgba(255, 255, 255, 0) 0%, rgba(9, 20, 38, 0.30) 100%);
  }
  .panel-inner { max-width: 380px; }
}

/* 矮屏（横屏手机） */
@media (max-height: 560px) {
  .glass { justify-content: flex-start; padding-top: 28px; padding-bottom: 28px; }
  .brand { margin-bottom: 18px; }
  h1 { margin-bottom: 14px; font-size: 20px; }
}
