/* =========================
   AUTH PAGE LAYOUT
   ========================= */

.auth-page {
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3rem;
}

/* =========================
   AUTH CARD
   ========================= */

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-primary);
  padding: 36px 32px;
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  text-align: center;
}

/* Heading */
.auth-card h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
}

/* =========================
   FORM
   ========================= */

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

.auth-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Focus */
.auth-card input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* Submit button */
.auth-card button {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--accent-primary);
  color: var(--text-inverse);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-card button:hover {
  background: var(--accent-secondary);
}

/* =========================
   FOOTER TEXT
   ========================= */

.auth-card p {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-card a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

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

/* =========================
   FORM INTERACTION
   ========================= */

input,
textarea,
select {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transform: translateY(-1px);
}
/* =========================
   AUTH RESPONSIVE (Full Screen)
   ========================= */

@media (max-width: 640px) {
  /* 1. Remove the 3rem margin and fix height */
  .auth-page {
    margin: 0 !important;      /* Removes the huge outer gaps */
    min-height: 70vh;         /* Use min-height instead of max-height */
    align-items: flex-start;   /* Start from top so keyboard doesn't hide inputs */
    padding-top: 10vh;         /* Push form down slightly from the very top */
  }

  /* 2. Flatten the Card */
  .auth-card {
    max-width: 100%;
    width: 100%;
    border-radius: 0;          /* Full width edges */
    box-shadow: none;          /* Remove card shadow */
    padding: 20px 24px;        /* Compact internal padding */
    background: transparent;   /* Blends into the body */
  }

  /* 3. Scale Down Text & Inputs */
  .auth-card h2 {
    font-size: 1.4rem;         /* Smaller heading */
    margin-bottom: 15px;
  }

  .auth-card p {
    font-size: 0.8rem;         /* Scale down instructions */
    margin-top: 10px;
  }

  .auth-card input {
    font-size: 16px;           /* Prevents iOS zoom-on-tap */
    padding: 10px 12px;        /* Slimmer inputs */
  }

  /* 4. Make buttons easier to tap */
  .auth-card button {
    padding: 16px;
    font-size: 1rem;
    margin-top: 15px;
  }

  /* 5. Error Message Scaling */
  .error {
    font-size: 0.8rem;
    padding: 8px;
    border-radius: 8px;
  }
}

/* Fix for ultra-small screens */
@media (max-width: 360px) {
  .auth-card {
    padding: 15px;
  }
  .auth-card h2 {
    font-size: 1.2rem;
  }
}