:root {
  --bg: #eef1f7;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --brand: #2563eb;
  --brand-2: #4f46e5;
  --brand-grad: linear-gradient(135deg, #2563eb, #4f46e5);
  --red: #dc2626;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 460px at 14% -140px, rgba(37, 99, 235, 0.16), transparent 62%),
    radial-gradient(760px 420px at 88% -110px, rgba(124, 58, 237, 0.13), transparent 60%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

.login-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.login-card {
  width: min(400px, 100%);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 28px 70px rgba(15, 23, 42, 0.14);
  padding: 34px 32px 26px;
}

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }

.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  background: var(--brand-grad);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}
.brand-mark svg { width: 22px; height: 22px; }

.brand-text h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.brand-text p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); }

.field { display: block; margin-bottom: 16px; }
.field .label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-2);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field input::placeholder { color: #b6c0cd; }
.field input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pw { position: relative; display: block; }
.pw input { padding-right: 62px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 7px;
  cursor: pointer;
}
.pw-toggle:hover { background: rgba(15, 23, 42, 0.05); color: var(--text-2); }

.err {
  margin: 0 0 14px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 9px;
}

.submit {
  width: 100%;
  padding: 12px 16px;
  margin-top: 4px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  color: #fff;
  background: var(--brand-grad);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.06s, box-shadow 0.15s, opacity 0.15s;
}
.submit:hover { box-shadow: 0 14px 30px rgba(37, 99, 235, 0.34); }
.submit:active { transform: translateY(1px); }
.submit:disabled { opacity: 0.65; cursor: progress; box-shadow: none; }

.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 0;
  font-size: 11.5px;
  color: var(--text-3);
}
.foot svg { width: 13px; height: 13px; }

@media (max-width: 420px) {
  .login-card { padding: 28px 22px 22px; border-radius: 18px; }
}
