/* =========================================
   AUTH PAGE
========================================= */

.auth-page {
  min-height: 100vh;
  background: var(--background);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* =========================================
   LEFT SHOWCASE
========================================= */

.auth-showcase {
  position: relative;
  overflow: hidden;

  padding: 38px 48px;

  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.15),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      #0c5fd5,
      #1677ff 58%,
      #4da3ff
    );

  color: white;

  display: flex;
  flex-direction: column;
}

.auth-showcase::before {
  content: "";
  position: absolute;

  width: 360px;
  height: 360px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);

  right: -130px;
  bottom: -120px;
}

.auth-showcase::after {
  content: "";
  position: absolute;

  width: 220px;
  height: 220px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.16);

  left: -80px;
  top: 160px;
}

.auth-brand {
  position: relative;
  z-index: 2;

  color: white;
}

.auth-brand .brand-mark {
  background: white;
  color: var(--primary);
}

.auth-brand .brand-name {
  color: white;
}

.auth-showcase-content {
  position: relative;
  z-index: 2;

  width: min(100%, 620px);

  margin: auto 0;
}

.auth-eyebrow {
  display: inline-block;

  margin-bottom: 18px;

  font-size: 12px;
  font-weight: 800;

  letter-spacing: 1.2px;

  color: rgba(255, 255, 255, 0.72);
}

.auth-showcase-content h1 {
  font-size: clamp(42px, 5vw, 68px);

  line-height: 1.04;

  letter-spacing: -2.4px;

  max-width: 620px;
}

.auth-showcase-content h1 span {
  display: block;

  color: rgba(255, 255, 255, 0.78);
}

.auth-showcase-content > p {
  margin-top: 22px;

  max-width: 560px;

  font-size: 17px;
  line-height: 1.7;

  color: rgba(255, 255, 255, 0.8);
}

.auth-benefits {
  margin-top: 34px;

  display: flex;
  flex-direction: column;

  gap: 16px;
}

.auth-benefit {
  display: flex;
  align-items: center;

  gap: 14px;

  padding: 14px 16px;

  border-radius: 17px;

  background: rgba(255, 255, 255, 0.1);

  border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-benefit-icon {
  width: 46px;
  height: 46px;

  flex-shrink: 0;

  display: grid;
  place-items: center;

  border-radius: 13px;

  background: rgba(255, 255, 255, 0.14);

  font-size: 20px;
}

.auth-benefit strong {
  display: block;

  font-size: 15px;
}

.auth-benefit span {
  display: block;

  margin-top: 3px;

  font-size: 12px;

  color: rgba(255, 255, 255, 0.72);
}

.auth-showcase-footer {
  position: relative;
  z-index: 2;

  margin-top: 30px;

  font-size: 12px;

  color: rgba(255, 255, 255, 0.6);
}

/* =========================================
   RIGHT FORM SIDE
========================================= */

.auth-form-side {
  background: #ffffff;

  display: flex;

  justify-content: center;

  padding: 46px 26px;

  overflow-y: auto;
}

.forgot-password-link {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.auth-form-container {
  width: min(100%, 520px);

  margin: auto 0;
}

.mobile-auth-brand {
  display: none;

  margin-bottom: 28px;
}

.auth-form-heading {
  margin-bottom: 30px;
}

.auth-form-label {
  display: inline-block;

  color: var(--primary);

  font-size: 12px;
  font-weight: 800;

  letter-spacing: 1px;

  margin-bottom: 8px;
}

.auth-form-heading h2 {
  font-size: 38px;

  line-height: 1.1;

  letter-spacing: -1.2px;
}

.auth-form-heading p {
  margin-top: 10px;

  color: var(--muted);

  font-size: 15px;
}

/* =========================================
   FORM
========================================= */

.auth-form {
  display: flex;

  flex-direction: column;

  gap: 18px;
}

.form-group {
  width: 100%;
}

.form-group label {
  display: block;

  margin-bottom: 8px;

  font-size: 13px;

  font-weight: 700;

  color: #374151;
}

.label-row {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 10px;
}

.optional-label {
  font-size: 11px;

  color: var(--muted);

  background: #f3f4f6;

  border-radius: 999px;

  padding: 4px 8px;
}

.input-wrapper {
  min-height: 58px;

  display: flex;

  align-items: center;

  gap: 10px;

  padding: 0 14px;

  background: #f8fafc;

  border: 1px solid var(--border);

  border-radius: 15px;

  transition: 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: var(--primary);

  background: white;

  box-shadow:
    0 0 0 4px rgba(22, 119, 255, 0.08);
}

.input-icon {
  width: 28px;

  flex-shrink: 0;

  display: grid;

  place-items: center;

  font-size: 17px;
}

.input-wrapper input {
  flex: 1;

  min-width: 0;

  height: 56px;

  border: 0;

  outline: 0;

  background: transparent;

  color: var(--text);

  font-size: 15px;
}

.input-wrapper input::placeholder {
  color: #9ca3af;
}

.password-toggle {
  flex-shrink: 0;

  color: var(--primary);

  font-size: 12px;

  font-weight: 700;

  padding: 6px;
}

.field-error {
  display: block;

  min-height: 18px;

  margin-top: 5px;

  font-size: 12px;

  color: var(--danger);
}

.referral-link-notice {
  margin-top: 8px;

  padding: 10px 12px;

  border-radius: 12px;

  background: #ecfdf3;

  color: #15803d;

  font-size: 12px;

  font-weight: 600;
}

/* =========================================
   TERMS
========================================= */

.terms-row {
  margin-top: -2px;
}

.checkbox-label {
  display: flex;

  align-items: flex-start;

  gap: 10px;

  cursor: pointer;

  color: var(--muted);

  font-size: 13px;

  line-height: 1.55;
}

.checkbox-label input {
  margin-top: 3px;

  width: 17px;

  height: 17px;

  accent-color: var(--primary);

  flex-shrink: 0;
}

.checkbox-label a {
  color: var(--primary);

  font-weight: 700;
}

/* =========================================
   MESSAGES
========================================= */

.auth-message {
  padding: 13px 14px;

  border-radius: 13px;

  font-size: 13px;

  line-height: 1.5;
}

.auth-message-error {
  background: #fef2f2;

  border: 1px solid #fecaca;

  color: #b91c1c;
}

.auth-message-success {
  background: #ecfdf3;

  border: 1px solid #bbf7d0;

  color: #15803d;
}

/* =========================================
   SUBMIT
========================================= */

.auth-submit-button {
  width: 100%;

  min-height: 58px;

  border-radius: 16px;

  margin-top: 2px;

  font-size: 16px;

  position: relative;
}

.auth-submit-button:disabled {
  opacity: 0.7;

  cursor: not-allowed;

  transform: none;
}

.button-loader {
  width: 22px;

  height: 22px;

  border-radius: 50%;

  border: 2px solid rgba(255, 255, 255, 0.4);

  border-top-color: #ffffff;

  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
   SWITCH
========================================= */

.auth-switch {
  margin-top: 24px;

  text-align: center;

  color: var(--muted);

  font-size: 14px;
}

.auth-switch a {
  margin-left: 4px;

  color: var(--primary);

  font-weight: 800;
}

/* =========================================
   SECURITY NOTE
========================================= */

.auth-security-note {
  margin-top: 24px;

  padding: 14px;

  display: flex;

  align-items: flex-start;

  gap: 10px;

  border-radius: 14px;

  background: #f8fafc;

  border: 1px solid var(--border);
}

.auth-security-note > div {
  flex-shrink: 0;
}

.auth-security-note p {
  color: var(--muted);

  font-size: 12px;

  line-height: 1.6;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-form-side {
    min-height: 100vh;

    padding: 34px 20px;
  }

  .mobile-auth-brand {
    display: inline-flex;
  }

  .auth-form-container {
    width: min(100%, 560px);
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {
  .auth-form-side {
    padding: 24px 14px 34px;
  }

  .auth-form-heading {
    margin-bottom: 25px;
  }

  .auth-form-heading h2 {
    font-size: 32px;
  }

  .auth-form-heading p {
    font-size: 14px;
  }

  .auth-form {
    gap: 15px;
  }

  .input-wrapper {
    min-height: 54px;

    padding: 0 12px;
  }

  .input-wrapper input {
    height: 52px;

    font-size: 14px;
  }

  .auth-submit-button {
    min-height: 54px;
  }

  .checkbox-label {
    font-size: 12px;
  }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 380px) {
  .auth-form-side {
    padding-inline: 10px;
  }

  .auth-form-heading h2 {
    font-size: 29px;
  }

  .brand-name {
    font-size: 19px;
  }
}