/* ============================================================
   Auth pages (login, signup, callback)
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 1.75rem;
}

.auth-logo span {
  color: var(--cyan);
}

.auth-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: .4rem;
}

.auth-card > p {
  color: var(--text-sub);
  font-size: .88rem;
  margin-bottom: 1.6rem;
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .25rem;
  margin-bottom: 1.6rem;
  gap: .25rem;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: .55rem .5rem;
  border-radius: calc(var(--radius-sm) - 4px);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-sub);
  background: none;
  border: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.auth-tab.active {
  background: var(--badge-bg);
  color: var(--cyan);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.auth-field label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem .9rem;
  font-size: .88rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: border-color .15s ease;
  width: 100%;
}

.auth-input::placeholder {
  color: var(--text-sub);
}

.auth-input:focus {
  outline: none;
  border-color: var(--cyan);
}

.auth-error {
  font-size: .8rem;
  color: var(--red);
  min-height: 1em;
}

.btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .88rem;
  border: none;
  cursor: pointer;
  transition: opacity .2s ease;
  width: 100%;
}

.btn-auth.primary {
  background: var(--text);
  color: var(--bg);
}

.btn-auth.primary:hover {
  opacity: .9;
}

.btn-auth.primary:disabled {
  opacity: .6;
  cursor: default;
}

.btn-auth.ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-auth.ghost:hover {
  border-color: var(--border-h);
}

.btn-auth.discord {
  background: #5865F2;
  color: #fff;
}

.btn-auth.discord:hover {
  opacity: .9;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin: 1.5rem 0;
  color: var(--text-sub);
  font-size: .78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer-link {
  text-align: center;
  font-size: .84rem;
  color: var(--text-sub);
  margin-top: 1.5rem;
}

.auth-footer-link a {
  color: var(--cyan);
  font-weight: 600;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--text-sub);
  margin-bottom: 1.5rem;
}

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

/* Callback page */

.auth-callback-card {
  text-align: center;
}

.auth-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: auth-spin .8s linear infinite;
}

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

.auth-callback-card .auth-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.75rem 1.4rem;
  }
}
