/* === AUTH: Login / Register === */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 44px 32px 32px;
  text-align: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(45, 143, 78, 0.08), 0 2px 8px rgba(0,0,0,0.03);
}

.auth-card img {
  width: 72px; height: 72px; border-radius: 18px;
  margin-bottom: 12px;
  box-shadow: 0 4px 24px rgba(45, 143, 78, 0.18);
  animation: authIconEntrance 1.8s cubic-bezier(.22,.68,.36,1.2) forwards;
}

/* Auth icon entrance: heartbeat pulse then grow */
@keyframes authIconEntrance {
  0% { transform: scale(0.2); opacity: 0; filter: blur(4px); }
  20% { transform: scale(1.15); opacity: 1; filter: blur(0); }
  30% { transform: scale(0.9); }
  40% { transform: scale(1.2); box-shadow: 0 0 40px rgba(56,161,105,.35); }
  50% { transform: scale(0.95); }
  60% { transform: scale(1.1); box-shadow: 0 0 30px rgba(56,161,105,.25); }
  70% { transform: scale(0.98); }
  80% { transform: scale(1.05); }
  100% { transform: scale(1); box-shadow: 0 4px 24px rgba(45,143,78,.18); }
}

/* Auth card fade in */
.auth-card {
  animation: authCardIn .8s ease-out .2s both;
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card h1 {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #2d8f4e, #68d391, #f9a8c9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.auth-card p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

.auth-field { margin-bottom: 16px; text-align: left; }
.auth-field label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--txt);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-g); }

/* PASSWORD WRAPPER WITH TOGGLE */
.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-password-wrap input {
  padding-right: 44px;
}
.toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%; transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--muted);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.toggle-pass:hover { color: var(--accent); background: var(--accent-g); }

.auth-btn { width: 100%; margin-top: 10px; }
.auth-switch { margin-top: 20px; font-size: 13px; color: var(--txt2); }
.auth-switch a { color: var(--accent); cursor: pointer; font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.auth-error {
  background: rgba(229, 62, 62, 0.08);
  border: 1px solid rgba(229, 62, 62, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e53e3e;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
}

.auth-error.show { display: block; }

/* AUTH BACK LINK */
.auth-back {
  position: absolute;
  top: 14px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
  z-index: 2;
}
.auth-back:hover { color: var(--accent); }

/* MOBILE ADJUSTMENTS */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 24px; }
  .auth-card h1 { font-size: 22px; }
  .auth-field input { font-size: 16px; padding: 12px 12px; }
}
