:root {
  --bg0: #0c1222;
  --bg1: #151d2e;
  --card: #1c2638;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #3d8bfd;
  --accent-dim: #2a6fd6;
  --danger: #f4717a;
  --ok: #4cd4a0;
  --radius: 14px;
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(61, 139, 253, 0.18), transparent),
    radial-gradient(800px 400px at 100% 0%, rgba(244, 113, 122, 0.1), transparent),
    linear-gradient(165deg, var(--bg0), var(--bg1));
}

.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.65rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.toast {
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--border);
}

.toast.hidden {
  display: none;
}

.toast.err {
  color: #ffc9cc;
  background: rgba(244, 113, 122, 0.12);
  border-color: rgba(244, 113, 122, 0.35);
}

.toast.ok {
  color: #b8f0d8;
  background: rgba(76, 212, 160, 0.12);
  border-color: rgba(76, 212, 160, 0.35);
}

.view.hidden {
  display: none !important;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 4px;
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: rgba(61, 139, 253, 0.2);
  color: var(--text);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.field {
  display: block;
  margin-bottom: 1rem;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field-label i {
  opacity: 0.85;
  width: 1em;
}

.field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.field input:focus {
  border-color: rgba(61, 139, 253, 0.55);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.15);
}

.btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  margin-top: 0.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 0.75rem;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.done-line {
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.done-line strong {
  color: var(--text);
}

.auth-foot {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.auth-foot code {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
