/* ==========================================================================
   Auth page – two-column card, left image (aurora), right form, dark theme
   ========================================================================== */

.auth-page {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  box-sizing: border-box;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  perspective: 1200px;
}

.auth-page-bg {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at center, rgba(154, 227, 75, 0.35) 2.5px, transparent 2.5px),
    radial-gradient(circle at center, rgba(154, 227, 75, 0.2) 1.5px, transparent 1.5px),
    linear-gradient(135deg, #0a0a0c 0%, #0f1410 35%, rgba(26, 40, 15, 0.95) 65%, rgba(154, 227, 75, 0.15) 100%);
  background-size: 56px 56px, 88px 88px, 100% 100%;
  background-position: 0 0, 24px 24px, 0 0;
  background-repeat: repeat;
  z-index: -1;
}

/* Centered card – larger login section, 3D depth, fits viewport without scroll */
.auth-page #auth-screen {
  display: flex;
  width: 100%;
  max-width: 1100px;
  max-height: calc(100vh - 6rem);
  min-height: 400px;
  border-radius: 20px;
  overflow: hidden;
  background: #2a2a2e;
  transform-style: preserve-3d;
  transform: rotateX(2deg) rotateY(-1deg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.35),
    0 32px 64px rgba(0, 0, 0, 0.45),
    0 56px 112px rgba(0, 0, 0, 0.5);
}

/* Left: image panel */
.auth-card-left {
  flex: 1;
  min-width: 400px;
  position: relative;
  display: flex;
  flex-direction: column;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  overflow: hidden;
}

.auth-card-left-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-card-left-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

.auth-card-left-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 2.5rem 3rem;
}

.auth-card-left-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: auto;
}

.auth-card-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.auth-card-left-text {
  margin-top: auto;
  padding-bottom: 3rem;
}

.auth-card-headline {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.auth-card-subline {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.01em;
}

.auth-card-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.auth-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s;
}

.auth-card-dot--active {
  background: #fff;
}

/* Right: form panel */
.auth-card-right {
  flex: 1;
  min-width: 360px;
  max-width: 520px;
  background: #2a2a2e;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 3rem 3rem;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  overflow: hidden;
}

.auth-card-right-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Message – fixed-height slot at bottom so card never resizes when message appears */
.auth-page .auth-message-wrap {
  height: 3.5rem;
  min-height: 3.5rem;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
}

.auth-page .auth-message {
  padding: 0.75rem 1rem;
  margin: 0;
  font-size: 0.875rem;
  border-radius: 10px;
  background: rgba(76, 175, 80, 0.2);
  color: #a5d6a7;
  width: 100%;
  animation: auth-message-in 0.3s ease;
  box-sizing: border-box;
}

.auth-page .auth-message[hidden] {
  display: none;
}

.auth-page .auth-message.auth-message--error {
  background: rgba(244, 67, 54, 0.2);
  color: #ef9a9a;
}

@keyframes auth-message-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form */
.auth-page .auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-page .auth-form--hidden {
  display: none !important;
}

/* Verification email sent view */
.auth-page .auth-verification {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: auth-verification-in 0.35s ease;
}

.auth-page .auth-verification.auth-verification--hidden {
  display: none !important;
}

.auth-page .auth-card-right-inner.auth-showing-verification .auth-form {
  display: none !important;
}

.auth-page .auth-card-right-inner.auth-showing-verification .auth-verification.auth-verification--hidden {
  display: none !important;
}

.auth-page .auth-verification-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.auth-page .auth-verification-text {
  margin: 0;
  font-size: 0.9375rem;
  color: #98989d;
  line-height: 1.5;
}

.auth-page .auth-verification-text strong {
  color: #f5f5f7;
  font-weight: 600;
}

@keyframes auth-verification-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-page .auth-title {
  margin: 0 0 0.25rem;
  font-size: 2rem;
  font-weight: 700;
  color: #f5f5f7;
  letter-spacing: -0.02em;
}

.auth-page .auth-subtitle {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: #98989d;
}

.auth-page .auth-link {
  color: #9ae34b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-page .auth-link:hover {
  color: #b2ff00;
}

.auth-page .auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.auth-page .auth-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #98989d;
}

.auth-page .auth-field {
  position: relative;
}

.auth-page .auth-field--password .auth-input {
  padding-right: 3rem;
}

.auth-page .auth-input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  font-size: 1rem;
  font-family: inherit;
  color: #f5f5f7;
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-page .auth-input::placeholder {
  color: #6e6e73;
}

.auth-page .auth-input:focus {
  border-color: #9ae34b;
  box-shadow: 0 0 0 3px rgba(154, 227, 75, 0.25);
}

.auth-page .auth-field--password .auth-input-wrap {
  position: relative;
  display: block;
}

.auth-page .auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  padding: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #6e6e73;
  line-height: 0;
}

.auth-page .auth-password-toggle:hover {
  color: #98989d;
}

.auth-page .auth-password-toggle .auth-password-icon img {
  display: block;
  width: 20px;
  height: 20px;
  filter: brightness(0);
}

.auth-page .auth-password-toggle:hover .auth-password-icon img {
  filter: brightness(0);
  opacity: 0.85;
}

/* Create account form: white eye icon */
.auth-page #auth-signup-form .auth-password-toggle .auth-password-icon img {
  filter: invert(1) brightness(0.9);
}

.auth-page #auth-signup-form .auth-password-toggle:hover .auth-password-icon img {
  filter: invert(1) brightness(1);
  opacity: 0.9;
}

.auth-page .auth-password-icon--show {
  display: none;
}

.auth-page .auth-password-toggle[aria-pressed="true"] .auth-password-icon--hide {
  display: none;
}

.auth-page .auth-password-toggle[aria-pressed="true"] .auth-password-icon--show {
  display: block;
}

.auth-page .auth-field--checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-page .auth-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: #9ae34b;
  flex-shrink: 0;
  vertical-align: middle;
}

.auth-page .auth-checkbox-label {
  font-size: 0.875rem;
  color: #98989d;
  cursor: pointer;
  line-height: 1.4;
}

.auth-page .auth-submit--primary {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  font-family: inherit;
  color: #1a1a1e;
  background: linear-gradient(90deg, #b2ff00 0%, #9ae34b 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  margin-top: 0.25rem;
}

.auth-page .auth-submit--primary:hover {
  opacity: 0.95;
  box-shadow: 0 4px 16px rgba(154, 227, 75, 0.45);
}

.auth-page .auth-submit--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-page .auth-forgot {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #9ae34b;
  text-decoration: none;
  align-self: flex-start;
  margin: -0.25rem 0 0;
  transition: color 0.2s;
}

.auth-page .auth-forgot:hover {
  color: #b2ff00;
}


/* Responsive */
@media (max-width: 900px) {
  .auth-page #auth-screen {
    flex-direction: column;
    min-height: auto;
    max-width: 480px;
  }

  .auth-card-left {
    min-height: 280px;
    min-width: 100%;
  }

  .auth-card-headline {
    font-size: 1.5rem;
  }

  .auth-card-subline {
    font-size: 1.125rem;
  }

  .auth-card-right {
    max-width: 100%;
    padding: 2rem 1.5rem;
  }

  .auth-page .auth-row {
    grid-template-columns: 1fr;
  }

}

/* Simple single-card login (no left image) */
#auth-screen.auth-simple {
  display: block;
  width: 100%;
  max-width: 400px;
  min-height: 0;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 2.5rem;
}

#auth-screen.auth-simple .auth-simple-logo {
  display: block;
  height: 36px;
  width: auto;
  margin-bottom: 2rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
