.hidden { display: none !important; }

.auth-page {


  min-height: 100dvh;

  display: flex;

  align-items: center;

  justify-content: center;

  background: var(--wa-bg);

  padding: 1.5rem;

  position: relative;

}



.auth-page::before {

  content: "";

  position: fixed;

  inset: 0;

  pointer-events: none;

  z-index: 0;

  background-image:

    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),

    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);

  background-size: 64px 64px;

  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 100%);

}



.auth-card {

  position: relative;

  z-index: 1;

  width: 100%;

  max-width: 22rem;

  background: var(--wa-surface-1);

  border: 1px solid var(--wa-border);

  border-radius: var(--wa-radius-lg);

  padding: 1.5rem 1.35rem;

  box-shadow: var(--wa-shadow-md);

}



.auth-brand {

  display: flex;

  align-items: center;

  gap: 0.45rem;

  font-size: 0.875rem;

  font-weight: 500;

  color: var(--wa-text);

  margin-bottom: 1.25rem;

}



.auth-brand img {

  filter: brightness(0) invert(1);

}



.auth-title {

  font-size: 1.25rem;

  font-weight: 600;

  margin: 0 0 1rem;

  color: var(--wa-text);

}



.auth-tabs {

  display: flex;

  gap: 0.5rem;

  margin-bottom: 1rem;

  border-bottom: 1px solid var(--wa-border);

}



.auth-tab {

  border: none;

  background: none;

  padding: 0.45rem 0.35rem;

  margin-bottom: -1px;

  font-size: 0.8125rem;

  color: var(--wa-text-muted);

  cursor: pointer;

  border-bottom: 2px solid transparent;

}



.auth-tab.active {

  color: var(--wa-accent);

  border-bottom-color: var(--wa-accent);

}



.field {

  display: flex;

  flex-direction: column;

  gap: 0.35rem;

  margin-bottom: 0.85rem;

}



.field label {

  font-size: 0.75rem;

  color: var(--wa-text-muted);

}



.field-input {

  height: 36px;

  border: 1px solid var(--wa-border);

  border-radius: var(--wa-radius-sm);

  padding: 0 0.65rem;

  font-size: 0.875rem;

  background: var(--wa-surface-inset);

  color: var(--wa-text);

}



.field-input::placeholder {

  color: var(--wa-text-faint);

}



.field-input:focus {

  outline: none;

  box-shadow: 0 0 0 2px var(--wa-accent-soft);

  border-color: var(--wa-accent-border);

}



.field-row {

  display: flex;

  gap: 0.5rem;

}



.field-error {

  font-size: 0.75rem;

  color: var(--wa-danger);

  margin: -0.35rem 0 0.65rem;

}



.btn-primary {

  height: 36px;

  border: none;

  border-radius: var(--wa-radius-pill);

  background: var(--wa-text);

  color: var(--wa-bg);

  font-size: 0.8125rem;

  font-weight: 600;

  cursor: pointer;

  width: 100%;

}



.btn-primary:hover { background: #e4e4e7; }

.btn-primary:active { transform: scale(0.98); }

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }



.btn-ghost {

  height: 36px;

  border: 1px solid var(--wa-border);

  border-radius: var(--wa-radius-sm);

  background: transparent;

  color: var(--wa-text);

  font-size: 0.8125rem;

  cursor: pointer;

  padding: 0 0.75rem;

  white-space: nowrap;

}



.btn-ghost:hover {

  background: var(--wa-surface-2);

}



.auth-footer-link {

  margin-top: 1rem;

  text-align: center;

  font-size: 0.8125rem;

  color: var(--wa-text-muted);

}



.auth-footer-link a {

  color: var(--wa-accent);

  text-decoration: none;

}



.auth-check {

  display: flex;

  align-items: flex-start;

  gap: 0.4rem;

  font-size: 0.75rem;

  color: var(--wa-text-muted);

  margin-bottom: 1rem;

}



.w-full { width: 100%; }

/* —— Auth modal overlay —— */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.auth-modal.hidden {
  display: none !important;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.auth-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 22rem;
  max-height: min(92dvh, 640px);
  overflow-y: auto;
  animation: auth-modal-in 0.22s ease-out;
}

@keyframes auth-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: var(--wa-radius-sm);
  background: transparent;
  color: var(--wa-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-close:hover {
  background: var(--wa-surface-2);
  color: var(--wa-text);
}

.auth-card--modal {
  margin: 0;
}

.auth-panel.hidden {
  display: none !important;
}

.auth-link-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--wa-accent);
  cursor: pointer;
  text-decoration: none;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

body.auth-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal-panel {
    animation: none;
  }
}

