:root {
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --blue: #3b82f6;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --line: #e8eaf2;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(31, 36, 48, .08);
}

* { box-sizing: border-box; }
/* hidden 属性必须优先于组件自身的 display，否则隐藏元素会露出来 */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select {
  font-family: inherit; font-size: 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; width: 100%;
  background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100%; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 10% -10%, #eef0ff 0%, #f6f7fb 45%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 12s ease-in-out infinite; }
.b1 { width: 320px; height: 320px; background: #a5b4fc; top: -80px; left: -60px; }
.b2 { width: 260px; height: 260px; background: #c4b5fd; bottom: -60px; right: 8%; animation-delay: -4s; }
.b3 { width: 200px; height: 200px; background: #93c5fd; bottom: 18%; left: 12%; animation-delay: -8s; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-28px) } }

.login-card {
  position: relative; width: 380px; background: var(--card); border-radius: 20px; padding: 32px 30px 28px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.login-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: 20px 20px 0 0; background: var(--grad);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.brand-logo {
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(99,102,241,.35);
}
.brand-logo.sm { width: 36px; height: 36px; font-size: 17px; border-radius: 11px; margin: 0; box-shadow: none; }
.brand-title { font-size: 19px; font-weight: 600; }
.brand-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.login-err { color: var(--rose); font-size: 13px; margin-bottom: 10px; text-align: center; }

.btn-grad {
  width: 100%; border: none; border-radius: 12px; padding: 12px; color: #fff; font-size: 15px; font-weight: 600;
  background: var(--grad); box-shadow: 0 8px 18px rgba(99,102,241,.28); transition: transform .15s, box-shadow .15s;
}
.btn-grad:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(99,102,241,.34); }
.btn-grad:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- 载入态 ---------- */
.boot-bar { height: 6px; border-radius: 999px; background: #eef0f7; position: relative; overflow: hidden; }
.boot-bar i {
  position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 999px; background: var(--grad);
  animation: bootmove 1.1s ease-in-out infinite;
}
@keyframes bootmove { 0% { left: -40%; } 100% { left: 100%; } }
