@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ─── CSS Variables ─── */
:root {
  --bg-deep: #080c15;
  --bg-surface: #0d1b2a;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent: #63e2e7;
  --accent-glow: rgba(99, 226, 231, 0.15);
  --cta: #e4316f;
  --cta-hover: #ff4081;
  --text: #f0f0f5;
  --text-muted: rgba(255, 255, 255, 0.45);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus: #63e2e7;
  --error: #ff4444;
  --success: #00c853;
  --radius-card: 16px;
  --radius-input: 10px;
  --radius-btn: 50px;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Body / Background ─── */
body {
  min-height: 100vh;
  background: linear-gradient(145deg, var(--bg-deep) 0%, var(--bg-surface) 50%, var(--bg-deep) 100%);
  font-family:
    'DM Sans',
    -apple-system,
    sans-serif;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Animated Background Orbs ─── */
.auth-page::before,
.auth-page::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
}

.auth-page::before {
  width: 300px;
  height: 300px;
  background: var(--accent);
  opacity: 0.18;
  top: -80px;
  left: -60px;
  animation: floatOrb1 18s ease-in-out infinite;
}

.auth-page::after {
  width: 420px;
  height: 420px;
  background: var(--cta);
  opacity: 0.12;
  bottom: -120px;
  right: -100px;
  animation: floatOrb2 22s ease-in-out infinite;
}

@keyframes floatOrb1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(60px, 40px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 80px) scale(0.95);
  }
}

@keyframes floatOrb2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-50px, -60px) scale(1.05);
  }
  66% {
    transform: translate(40px, -30px) scale(0.9);
  }
}

/* ─── Page Wrapper ─── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
}

/* ─── Card ─── */
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out both;
}

/* Subtle gradient shimmer on card border */
.auth-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-card) + 1px);
  background: linear-gradient(
    135deg,
    rgba(99, 226, 231, 0.15),
    transparent 40%,
    transparent 60%,
    rgba(228, 49, 111, 0.1)
  );
  z-index: -1;
  pointer-events: none;
}

/* ─── Brand ─── */
.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.auth-logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(99, 226, 231, 0.3));
}

.auth-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

/* ─── Headings ─── */
.auth-heading {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
  animation: fadeInUp 0.6s ease-out 0.15s both;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* ─── Form Group ─── */
.form-group {
  margin-bottom: 18px;
  animation: fadeInUp 0.5s ease-out both;
}

.form-group:nth-child(1) {
  animation-delay: 0.25s;
}
.form-group:nth-child(2) {
  animation-delay: 0.35s;
}
.form-group:nth-child(3) {
  animation-delay: 0.45s;
}
.form-group:nth-child(4) {
  animation-delay: 0.55s;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ─── Input Wrapper (for icons + toggle) ─── */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.25s ease;
  z-index: 2;
}

.input-wrapper:focus-within .input-icon {
  color: var(--accent);
}

/* ─── Inputs ─── */
.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-input);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.auth-input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255, 255, 255, 0.08);
}

/* Input with password toggle — extra right padding */
.auth-input--has-toggle {
  padding-right: 48px;
}

/* ─── Password Toggle ─── */
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  transition: color 0.2s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: var(--accent);
}

.toggle-password .eye-open {
  display: block;
}

.toggle-password .eye-closed {
  display: none;
}

/* ─── Links Row ─── */
.auth-links-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  margin-bottom: 4px;
  animation: fadeInUp 0.5s ease-out 0.4s both;
}

/* ─── Links ─── */
.auth-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.auth-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.auth-link--muted {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-link--muted:hover {
  color: var(--text);
}

.auth-link--back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─── CTA Button ─── */
.auth-btn {
  display: block;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--cta), var(--cta-hover));
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
  animation: fadeInUp 0.5s ease-out 0.5s both;
  margin-top: 24px;
}

.auth-btn:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(228, 49, 111, 0.35);
}

.auth-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ─── Footer ─── */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  animation: fadeInUp 0.5s ease-out 0.6s both;
}

/* ─── Resend Section ─── */
.resend-section {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  animation: fadeInUp 0.4s ease-out both;
}

.resend-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.resend-countdown {
  font-weight: 700;
  color: var(--accent);
}

.resend-btn {
  display: inline-block;
  padding: 8px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
  margin-top: 8px;
}

.resend-btn:hover:not(:disabled) {
  background: rgba(99, 226, 231, 0.1);
}

.resend-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Keyframes ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Responsive ─── */
@media screen and (max-width: 480px) {
  .auth-card {
    padding: 32px 24px;
    border-radius: 12px;
  }

  .auth-heading {
    font-size: 1.35rem;
  }

  .auth-brand {
    font-size: 1.2rem;
  }

  .auth-logo {
    height: 30px;
  }
}

@media screen and (max-width: 360px) {
  .auth-card {
    padding: 24px 18px;
  }
}

/* ─── SweetAlert2 compatibility ─── */
.swal2-container {
  z-index: 10000 !important;
}
