/* ── Auth Pages — Dark glassmorphism theme ─────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #05050A;
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Animated Background ───────────────────────────────── */

.animated-bg {
  position: fixed;
  inset: 0;
  background: #05050A;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.animated-bg canvas#orbs-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: blur(80px);
}

.animated-bg .noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.animated-bg canvas#sparkles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Main Layout ───────────────────────────────────────── */

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 8px;
  position: relative;
  z-index: 10;
}

.auth-container {
  width: 100%;
  max-width: 384px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Logo ──────────────────────────────────────────────── */

.auth-logo {
  margin-bottom: 32px;
}

.auth-logo a {
  display: block;
  cursor: pointer;
}

.auth-logo-img {
  height: 40px;
  width: auto;
}

/* ── Card ──────────────────────────────────────────────── */

.auth-card {
  width: 100%;
  background: rgba(10, 10, 15, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  border-radius: 32px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .auth-card {
    padding: 32px;
  }
}

/* ── Description ───────────────────────────────────────── */

.auth-description {
  text-align: center;
  margin-bottom: 24px;
}

.auth-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.625;
  color: #fff;
  margin-top: 4px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Error ─────────────────────────────────────────────── */

.auth-error {
  padding: 12px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  margin-bottom: 16px;
  animation: fadeSlideIn 0.3s ease;
}

.auth-error p,
.auth-error {
  font-size: 14px;
  color: #f87171;
  line-height: 1.625;
  font-weight: 500;
}

.auth-error.hidden {
  display: none;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Form ──────────────────────────────────────────────── */

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
  border-color: rgba(99, 102, 241, 0.5);
}

/* ── Submit Button ─────────────────────────────────────── */

.btn-submit {
  margin-top: 8px;
  align-self: center;
  padding: 12px 64px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0.05);
}

.btn-submit:hover {
  background: rgba(255, 255, 255, 0.9);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Forgot Password Link ──────────────────────────────── */

.auth-forgot {
  text-align: center;
  margin-top: 4px;
}

.auth-forgot a {
  font-size: 14px;
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.2s;
}

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

/* ── Success View ──────────────────────────────────────── */

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34d399;
}

/* ── Auth Switch ───────────────────────────────────────── */

.auth-switch {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-switch a {
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.2s;
}

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

/* ── Back Link ─────────────────────────────────────────── */

.auth-back {
  margin-top: 24px;
  text-align: center;
}

.auth-back a {
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
}

.auth-back a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

/* ── Footer ────────────────────────────────────────────── */

.auth-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 14px;
  padding: 0 24px 40px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .footer-links {
    flex-direction: row;
    gap: 12px;
  }
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-divider {
  display: none;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 640px) {
  .footer-divider {
    display: inline;
  }
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  cursor: default;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.5);
  max-width: 512px;
  line-height: 1.625;
  font-family: "Libre Baskerville", serif;
  font-style: italic;
  font-size: 18px;
}
