:root {
  --c-bg: #f4f6fa;
  --c-card: #ffffff;
  --c-primary: #1e3a5f;
  --c-primary-hover: #2a4f80;
  --c-accent: #6FA8FF;
  --c-text: #1f2a3a;
  --c-text-soft: #6b7891;
  --c-line: #e6eaf2;
  --c-error: #e45656;
  --c-ok: #2bb673;
  --radius: 12px;
}

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

html, body {
  height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(111, 168, 255, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(30, 58, 95, .10), transparent 60%);
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 通用卡片 + 表单 */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--c-card);
  border-radius: 18px;
  padding: 36px 32px 28px;
  box-shadow: 0 12px 40px rgba(30, 58, 95, .12), 0 2px 6px rgba(0, 0, 0, .04);
  border: 1px solid var(--c-line);
}

.brand { text-align: center; margin-bottom: 24px; }
.brand-logo { width: 44px; height: 44px; display: block; margin: 0 auto 10px; }
.brand h1 { font-size: 22px; font-weight: 600; color: var(--c-primary); letter-spacing: .5px; }
.brand-sub { font-size: 13px; color: var(--c-text-soft); margin-top: 6px; }

.auth-form { display: flex; flex-direction: column; gap: 12px; }

.field {
  display: flex;
  align-items: center;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 0 12px;
  height: 48px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(111, 168, 255, .18);
}

.field-icon {
  width: 20px; height: 20px;
  color: var(--c-text-soft);
  display: inline-flex;
  margin-right: 10px;
  flex-shrink: 0;
}
.field-icon svg { width: 20px; height: 20px; }

.field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  height: 100%;
  font-size: 15px;
  color: var(--c-text);
  min-width: 0;
}
.field input::placeholder { color: #a9b3c4; }

.toggle-pwd {
  border: 0; background: transparent; cursor: pointer;
  color: var(--c-text-soft);
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px;
}
.toggle-pwd svg { width: 20px; height: 20px; }
.toggle-pwd:hover { color: var(--c-primary); }

.field-error {
  color: var(--c-error);
  font-size: 12px;
  min-height: 14px;
  padding: 0 4px;
  margin-top: -4px;
}

.btn-primary {
  margin-top: 8px;
  height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn-primary:hover { background: var(--c-primary-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .6; cursor: not-allowed; }

.auth-foot {
  text-align: center;
  font-size: 13px;
  color: var(--c-text-soft);
  margin-top: 6px;
}
.auth-foot a { margin-left: 4px; }

/* 全局轻量提示条 */
.toast {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--c-text);
  padding: 10px 18px 10px 14px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
  z-index: 9999;
  border-left: 3px solid var(--c-error);
  animation: toast-in .15s ease-out;
}
.toast.ok { border-left-color: var(--c-ok); }
.toast .dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; background: var(--c-error); }
.toast.ok .dot { background: var(--c-ok); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
