/* ── Auth Pages — Login & Register ──────────────────────────── */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ── Animated background ───────────────────────────────────── */

.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
}

.auth-bg__orb--1 {
  width: 600px;
  height: 600px;
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, rgba(59,130,246,0.5), transparent 70%);
  animation: orb-float 20s ease-in-out infinite;
}

.auth-bg__orb--2 {
  width: 500px;
  height: 500px;
  bottom: -15%;
  right: -8%;
  background: radial-gradient(circle, rgba(139,92,246,0.4), transparent 70%);
  animation: orb-float 25s ease-in-out infinite reverse;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.05); }
  66%      { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Container ─────────────────────────────────────────────── */

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

/* ── Brand header ──────────────────────────────────────────── */

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  justify-content: center;
}

.auth-brand__mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59,130,246,0.9), rgba(139,92,246,0.8));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 28px rgba(59,130,246,0.2);
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.auth-brand__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.auth-brand__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-top: 1px;
}

.auth-brand__title span {
  color: rgba(232,236,246,0.4);
}

/* ── Card ──────────────────────────────────────────────────── */

.auth-card {
  background:
    linear-gradient(180deg, rgba(17,21,32,0.95), rgba(11,14,23,0.92)),
    linear-gradient(135deg, rgba(59,130,246,0.06), transparent 40%, rgba(139,92,246,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow:
    0 32px 64px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.auth-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-card__subtitle {
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 28px;
}

.auth-card__footer {
  text-align: center;
  font-size: 13px;
  color: var(--dim);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.auth-card__footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-card__footer a:hover {
  text-decoration: underline;
}

/* ── Form fields ───────────────────────────────────────────── */

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

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(232,236,246,0.72);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.auth-field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.auth-field input::placeholder {
  color: rgba(107,116,148,0.6);
}

.auth-field input:focus {
  border-color: rgba(59,130,246,0.5);
  background: rgba(59,130,246,0.04);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.auth-field__hint {
  font-size: 11px;
  font-family: var(--font-mono);
  margin-top: 6px;
  min-height: 16px;
}

/* ── Submit button ─────────────────────────────────────────── */

.auth-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), rgba(139,92,246,0.85));
  color: #fff;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  box-shadow: 0 4px 16px rgba(59,130,246,0.25);
}

.auth-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.3);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Alerts ────────────────────────────────────────────────── */

.auth-alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.auth-alert--error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.24);
  color: #fca5a5;
}

.auth-alert--success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.24);
  color: #86efac;
}

/* ── Footnote ──────────────────────────────────────────────── */

.auth-footnote {
  text-align: center;
  font-size: 11px;
  font-family: var(--font-mono);
  color: rgba(107,116,148,0.5);
  margin-top: 24px;
  letter-spacing: 0.04em;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 480px) {
  .auth-container { padding: 16px; }
  .auth-card { padding: 28px 20px 24px; }
}
