/* ══════════════════════════════════════════════════════════════════════════
   AUTH.CSS — Signup, Login, Callback pages
   Matches Pluviax glassmorphism design system
   ════════════════════════════════════════════════════════════════════════ */

/* ── AUTH PAGE BASE ────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Center content vertically + horizontally */
.auth-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 60px;
  position: relative;
  z-index: 2;
}

/* ── AUTH CARD ─────────────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 580px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  padding: 40px 36px;
  box-shadow:
    0 20px 60px rgba(10, 40, 80, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.auth-card--login {
  max-width: 420px;
  text-align: center;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── AUTH HEADER ───────────────────────────────────────────────────────── */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px rgba(59, 158, 255, 0.4));
}

.auth-header h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(26px, 4vw, 36px);
  color: var(--ink, #0b1c2e);
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted, #2a4a62);
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.7);
}

/* ── ROLE SELECTION GRID ───────────────────────────────────────────────── */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.role-card {
  position: relative;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 22px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  overflow: hidden;
}

.role-card:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(59, 158, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(10, 40, 80, 0.12);
}

.role-card.selected {
  border-color: var(--primary, #3b9eff);
  background: rgba(59, 158, 255, 0.08);
  box-shadow:
    0 0 0 4px rgba(59, 158, 255, 0.12),
    0 12px 32px rgba(10, 40, 80, 0.12);
  transform: translateY(-3px);
}

.role-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

.role-card h3 {
  font-family: "DM Serif Display", serif;
  font-size: 18px;
  color: var(--ink, #0b1c2e);
  margin-bottom: 8px;
}

.role-card p {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted, #2a4a62);
  line-height: 1.55;
  margin-bottom: 14px;
}

.role-perks {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.role-perks li {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mid, #1a3350);
}

/* Selected indicator */
.role-select-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary, #3b9eff);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.role-card.selected .role-select-indicator {
  opacity: 1;
  transform: scale(1);
}

/* ── AUTH CTA ──────────────────────────────────────────────────────────── */
.auth-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.auth-submit {
  width: 100%;
  font-size: 16px;
  padding: 14px;
  transition: all 0.25s ease;
}

.auth-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── DIVIDER ───────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.auth-divider span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted, #2a4a62);
  padding: 0 4px;
}

/* ── SWITCH + LEGAL TEXT ───────────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted, #2a4a62);
  margin-bottom: 10px;
}

.auth-switch a {
  color: var(--primary, #3b9eff);
  font-weight: 700;
  text-decoration: none;
}
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-legal {
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted, #2a4a62);
  line-height: 1.6;
  opacity: 0.8;
}

.auth-legal a {
  color: var(--primary, #3b9eff);
  text-decoration: none;
  font-weight: 600;
}
.auth-legal a:hover {
  text-decoration: underline;
}

/* Navbar switch text */
.auth-switch-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted, #2a4a62);
}

/* ── CALLBACK PAGE ─────────────────────────────────────────────────────── */
.callback-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(30px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  padding: 52px 44px;
  text-align: center;
  min-width: 340px;
  box-shadow: 0 20px 60px rgba(10, 40, 80, 0.16);
  animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.callback-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.callback-logo img {
  width: 32px;
  filter: drop-shadow(0 0 8px rgba(59, 158, 255, 0.4));
}

.callback-logo span {
  font-family: "DM Serif Display", serif;
  font-size: 20px;
  background: linear-gradient(135deg, #0b1c2e 0%, #1a6bb5 60%, #3b9eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Spinner */
.callback-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(59, 158, 255, 0.15);
  border-top-color: var(--primary, #3b9eff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

/* Success check */
.callback-check {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #34c98a, #5ee8a8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(52, 201, 138, 0.4);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Error icon */
.callback-error-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #ff6b6b, #ff9999);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.callback-title {
  font-family: "DM Serif Display", serif;
  font-size: 24px;
  color: var(--ink, #0b1c2e);
  margin-bottom: 10px;
}

.callback-msg {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted, #2a4a62);
  line-height: 1.6;
  margin-bottom: 20px;
}
/* ══════════════════════════════════════════════════════════════════════════════
   AUTH PAGES — MOBILE RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .auth-center {
    padding: 80px 16px 40px;
    align-items: flex-start;
  }
  .auth-card {
    padding: 28px 20px;
    border-radius: 20px;
  }
  .auth-card--login {
    max-width: 100%;
  }
  .role-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .role-card {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }
  .role-icon {
    font-size: 28px;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .role-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .role-card p {
    font-size: 12px;
    margin-bottom: 8px;
  }
  .role-perks {
    display: none; /* hide perks list on mobile to keep it clean */
  }
  .auth-header h1 {
    font-size: 24px;
  }
  .auth-header p {
    font-size: 14px;
  }
  .auth-submit {
    font-size: 15px;
    padding: 13px;
  }
  .callback-card {
    padding: 36px 24px;
    min-width: unset;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .auth-card {
    padding: 20px 14px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   NIGHT / GOLDEN — AUTH PAGE OVERRIDES
   ══════════════════════════════════════════════════════════════════════════ */

/* Night: Google sign-in button */
[data-tod="night"] .btn-google {
  background: rgba(15, 25, 70, 0.75) !important;
  border-color: rgba(60, 90, 200, 0.4) !important;
  color: rgba(210, 225, 255, 0.92) !important;
}
[data-tod="night"] .btn-google:hover {
  background: rgba(20, 35, 90, 0.9) !important;
}

/* Night: field labels inside auth cards */
[data-tod="night"] .auth-field label,
[data-tod="night"] .auth-label,
[data-tod="night"] label {
  color: rgba(175, 205, 255, 0.88) !important;
}

/* Night: error/info banners */
[data-tod="night"] .auth-error {
  background: rgba(80, 20, 20, 0.65) !important;
  border-color: rgba(200, 60, 60, 0.4) !important;
  color: rgba(255, 180, 180, 0.95) !important;
}
[data-tod="night"] .auth-success {
  background: rgba(10, 50, 30, 0.65) !important;
  border-color: rgba(50, 180, 100, 0.4) !important;
  color: rgba(150, 240, 180, 0.95) !important;
}

/* Night: "Signing you in" callback card logo text */
[data-tod="night"] .callback-logo span {
  background: linear-gradient(135deg, #a8d0ff, #72c0ff, #c0e0ff) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Golden: Google sign-in button */
[data-tod="golden"] .btn-google {
  background: rgba(255, 240, 200, 0.8) !important;
  border-color: rgba(200, 140, 20, 0.4) !important;
  color: #3d1e00 !important;
}
