/* 登录页样式 */

:root {
  --bg: #eef1f7;
  --bg-2: #e4e8f2;
  --card: rgba(255,255,255,.72);
  --text: #1e293b;
  --muted: #64748b;
  --accent: #6366f1;
  --accent-soft: rgba(99,102,241,.12);
  --danger: #ef4444;
  --ok: #22c55e;
  --radius: 16px;
  --mono: 'SF Mono','JetBrains Mono','Consolas',monospace;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrap {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.15);
}

.login-head {
  text-align: center;
  margin-bottom: 28px;
}
.login-head h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .5px;
}
.login-head p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.login-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: rgba(0,0,0,.05);
  border-radius: 10px;
  padding: 3px;
}
.tab {
  flex: 1;
  border: none;
  background: none;
  padding: 8px 0;
  font-size: 14px;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}
.tab.is-on {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 2px 8px -2px rgba(0,0,0,.1);
}

.form { display: none; }
.form.is-on { display: block; }

.field {
  display: block;
  margin-bottom: 16px;
}
.field span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.6);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-submit {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}
.btn-submit:hover { opacity: .9; }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { opacity: .5; cursor: wait; }

.hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

/* 忘记密码 / 链接按钮 */
.field-row {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 12px;
}
.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* 验证码行 */
.code-row {
  display: flex;
  gap: 8px;
}
.code-row input { flex: 1; min-width: 0; }
.btn-code {
  flex: none;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .2s;
}
.btn-code:hover { opacity: .85; }
.btn-code:disabled { opacity: .5; cursor: not-allowed; }

.toast {
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
  min-height: 20px;
  color: var(--danger);
}
.toast.ok { color: var(--ok); }
