/* 登录页（颜色见 theme.css） */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: "DM Sans", "Microsoft YaHei UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background: var(--bg-deep);
}

.page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  background: linear-gradient(135deg, var(--login-bg-1) 0%, var(--login-bg-mid) 45%, var(--login-bg-2) 100%);
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--login-blob-opacity);
  pointer-events: none;
}

.page::before {
  width: 420px;
  height: 420px;
  background: var(--login-blob-1);
  top: -120px;
  right: -80px;
  animation: float 12s ease-in-out infinite;
}

.page::after {
  width: 360px;
  height: 360px;
  background: var(--login-blob-2);
  bottom: -100px;
  left: -60px;
  animation: float 14s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(24px, -20px); }
}

.shell {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--login-shell-shadow);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(12px);
  border: 1px solid var(--login-glass-border);
}

@media (max-width: 768px) {
  .shell { grid-template-columns: 1fr; max-width: 440px; }
  .brand { display: none; }
}

.brand {
  padding: 48px 40px;
  background: var(--login-brand-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--login-glass-border);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.brand-badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px #4ade80;
}

.brand h1 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 280px;
}

.brand-features {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-features li {
  list-style: none;
  font-size: 13px;
  color: var(--login-feature);
  padding-left: 22px;
  position: relative;
}

.brand-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.panel {
  padding: 40px 36px 36px;
  background: var(--login-panel);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  background: var(--login-tabs-bg);
  padding: 4px;
  border-radius: 12px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.form-block { display: none; animation: fadeIn 0.35s ease; }
.form-block.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--login-label);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--login-input-bg);
  color: var(--login-input-text);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field input::placeholder { color: var(--text-dim); }

.captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.captcha-row input { flex: 1; }

.captcha-img {
  width: 120px;
  height: 46px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #f1f5f9;
  object-fit: cover;
  flex-shrink: 0;
}

.captcha-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

[data-theme="light"] .alert-error {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
}

.submit-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  box-shadow: 0 8px 24px var(--accent-glow);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px var(--accent-glow);
}

.submit-btn:active { transform: translateY(0); }

.panel-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}
