/* ============================================================
   auth.css — glassmorphic auth experience (login + signup)

   Loaded after base.css on the login and signup pages only.
   A single, uncluttered frosted-glass card centred over an
   ambient gradient backdrop. All colours derive from the
   base.css design tokens.
   ============================================================ */

/* ── Page shell + ambient backdrop ──────────────────────────── */
.auth-page {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
  overflow: hidden;
}

/* Soft animated colour blobs floating behind the glass card. */
.auth-page::before,
.auth-page::after {
  content: '';
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.auth-page::before {
  background: radial-gradient(circle at center, rgba(85, 141, 255, 0.5), transparent 70%);
  top: -160px;
  left: -120px;
  animation: authFloatA 16s ease-in-out infinite;
}

.auth-page::after {
  background: radial-gradient(circle at center, rgba(0, 244, 254, 0.35), transparent 70%);
  bottom: -180px;
  right: -120px;
  animation: authFloatB 18s ease-in-out infinite;
}

@keyframes authFloatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, 30px) scale(1.08); }
}

@keyframes authFloatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-40px, -30px) scale(1.12); }
}

/* ── Single centred glass card ──────────────────────────────── */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 2.75rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-subtle-strong);
  background: rgba(20, 22, 28, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 30px 60px -15px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Signup carries more fields, so it gets a little more width to
   keep the two-column rows comfortable. */
.auth-card-wide {
  max-width: 560px;
}

.auth-panel-head {
  margin-bottom: 2rem;
  text-align: center;
}

.auth-panel-head h1 {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
}

.auth-panel-head p {
  color: var(--neutral-500);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ── Form fields ────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.37rem;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.auth-field .form-label,
.auth-field > label {
  margin-bottom: 0;
  font-size: 0.825rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--neutral-700);
}

.auth-optional {
  color: var(--neutral-500);
  font-weight: 400;
}

.auth-field-error {
  font-size: 0.8rem;
  color: var(--error);
}

.auth-field-hint {
  font-size: 0.8rem;
  color: var(--neutral-500);
}

/* ── Inline checkbox rows (terms, remember me) ──────────────── */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.auth-check label {
  font-size: 0.875rem;
  color: var(--neutral-600);
  line-height: 1.45;
}

.auth-check .form-checkbox {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.auth-meta-row .auth-check {
  align-items: center;
}

.auth-meta-row .auth-check label {
  margin-bottom: 0;
}

.auth-link {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Submit button ──────────────────────────────────────────── */
.auth-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--primary-color), var(--primary-dark));
  border: none;
  color: #fff;
  letter-spacing: 0.01em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px rgba(85, 141, 255, 0.6);
}

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

/* ── Alternate action + footnote ────────────────────────────── */
.auth-alt-action {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--neutral-500);
}

.auth-alt-action a {
  font-weight: 600;
}

.auth-form-errors {
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 180, 171, 0.1);
  border: 1px solid rgba(255, 180, 171, 0.3);
  color: var(--error);
  font-size: 0.875rem;
}

.auth-form-errors p {
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 520px) {
  .auth-page {
    padding: 2rem 0;
  }

  .auth-card {
    padding: 1.75rem 1.5rem;
  }

  .auth-row {
    grid-template-columns: 1fr;
  }
}
