/* ── Login page layout ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 40px; /* top padding clears navbar */
  position: relative;
  z-index: 1;
}

/* ── Auth card ── */
.auth-card {
  width: min(440px, 100%);
  animation: rpmc-fadeUp 0.45s var(--ease) both;
}

/* ── Logo block ── */
.auth-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  text-align: center;
}
.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 2px solid var(--border-2);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}
.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.auth-logo-fallback {
  font-size: 2rem;
  color: var(--accent-2);
}
.auth-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 6px;
}
.auth-title span {
  background: linear-gradient(135deg, var(--accent-2), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-subtitle {
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 320px;
}

/* ── Main card body ── */
.auth-box {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.auth-box-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #60a5fa);
}
.auth-box-body {
  padding: 32px 32px 28px;
}

/* ── Section heading ── */
.auth-section-label {
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 18px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-section-label::before,
.auth-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Google button wrapper (Optimized Overlay) ── */
#google-btn-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.google-icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--border-2);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.35);
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  z-index: 1;
}

#google-btn-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.01;
  cursor: pointer;
  overflow: hidden;
}

#google-btn-wrap:hover .google-icon-btn {
  transform: translateY(-1px);
  filter: saturate(1.1);
}

/* ── Status message ── */
.auth-status {
  text-align: center;
  padding: 16px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  font-size: 0.84rem;
  display: none;
}
.auth-status.visible {
  display: block;
}
.auth-status.success {
  background: var(--success-dim);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.auth-status.error {
  background: var(--danger-dim);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

/* ── Note ── */
.auth-note {
  font-size: 0.74rem;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.auth-note a {
  color: var(--accent-2);
  text-decoration: none;
}
.auth-note a:hover {
  text-decoration: underline;
}

/* ── Already signed in card ── */
.auth-signed-in {
  text-align: center;
  padding: 24px;
}
.auth-signed-in-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 2px solid var(--border-2);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Mono", monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}
.auth-signed-in-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-signed-in-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.auth-signed-in-email {
  font-size: 0.76rem;
  color: var(--text-3);
  margin-bottom: 20px;
}
.auth-signed-in-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-signed-in-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.auth-signed-in-signout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-2);
  background: none;
  color: var(--text-3);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

/* ── Features list ── */
.auth-features {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  animation: rpmc-fadeUp 0.4s var(--ease) both;
}
.auth-feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}
.auth-feature-icon.blue {
  background: var(--accent-dim);
  color: var(--accent-2);
}
.auth-feature-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}
.auth-feature-icon.gold {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold);
}
.auth-feature-icon.purple {
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
}

.auth-feature-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.auth-feature-desc {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 1px;
}

/* ── Loading spinner ── */
.auth-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-2);
  animation: rpmc-spin 0.7s linear infinite;
  margin: 6px auto;
}

@media (max-width: 480px) {
  .login-page {
    padding: 72px 14px 32px;
  }
  .auth-box-body {
    padding: 24px 20px 22px;
  }
}
