/* ===== Login and signup ===== */

.auth {
  display: flex;
  min-height: 100vh;
  background: var(--bg-surface);
}

/* ----- Form side ----- */
.auth__form-side {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth__card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ----- Art side (desktop only) ----- */
.auth__art {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-9);
  padding: var(--space-12);
  background: var(--accent-base);
  text-align: center;
}

.auth__art-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--accent-hover);
  color: var(--text-on-accent);
}
.auth__art-mark .icon {
  --icon-size: 72px;
}

.auth__art-title {
  font-size: 28px;
  line-height: 38px;
  font-weight: var(--font-bold);
  color: var(--text-on-accent);
}

.auth__art-text {
  font-size: 16px;
  line-height: 26px;
  color: var(--bg-surface-alt);
}

/* ----- Brand row ----- */
.auth__brand {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
}

.auth__brand-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
}
.auth__brand-mark .icon {
  --icon-size: 26px;
}

.auth__brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.auth__brand-name {
  font-size: 18px;
  line-height: 28px;
  font-weight: var(--font-bold);
  color: var(--text-primary);
  white-space: nowrap;
}

/* ----- Headings ----- */
.auth__title {
  font-size: 26px;
  line-height: 34px;
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.auth__subtitle {
  font-size: 15px;
  line-height: 25px;
  color: var(--text-secondary);
}

/* ----- Login ----- */
.auth--login .auth__card {
  gap: var(--space-9);
  padding: var(--space-10);
}

.auth--login .auth__logo {
  display: flex;
  justify-content: center;
  width: 100%;
}

.auth--login .auth__logo-mark {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-pill);
}
.auth--login .auth__logo-mark .icon {
  --icon-size: 44px;
}

.auth--login .auth__heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  width: 100%;
}

.auth--login .btn {
  padding-block: var(--space-6);
}

/* ----- Signup ----- */
.auth--signup .auth__form-side {
  justify-content: flex-start;
}

.auth--signup .auth__card {
  gap: var(--space-6);
  padding: var(--space-8) var(--space-10);
}

.auth--signup .btn {
  padding-block: 15px;
}

.auth--signup .auth__title {
  font-size: 20px;
  line-height: 30px;
}

.auth--signup .auth__subtitle {
  font-size: 13px;
  line-height: 23px;
}

.auth__field-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  width: 100%;
}
.auth__field-row > .field,
.auth__field-row > .spacer {
  flex: 1 1 220px;
  min-width: 0;
}

/* ----- Desktop ----- */
@media (min-width: 768px) {
  .auth__art {
    display: flex;
  }

  .auth__form-side {
    align-items: center;
    padding: var(--space-12) var(--space-10);
  }

  .auth--login .auth__art {
    flex: 0 0 auto;
    width: clamp(260px, 43%, 620px);
  }

  .auth--signup .auth__art {
    flex: 0 0 auto;
    width: clamp(240px, 29%, 420px);
  }

  .auth--login .auth__logo {
    display: none;
  }

  .auth--login .auth__card {
    gap: var(--space-8);
    max-width: 400px;
    padding: 0;
  }

  .auth--login .auth__brand {
    display: flex;
  }

  .auth--login .auth__brand-mark {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-xl);
  }
  .auth--login .auth__brand-mark .icon {
    --icon-size: 28px;
  }

  .auth--login .auth__title {
    font-size: 30px;
    line-height: 40px;
  }

  .auth--login .auth__heading {
    gap: var(--space-8);
  }

  .auth--login .btn {
    padding-block: 15px;
  }

  .auth--signup .auth__form-side {
    justify-content: center;
  }

  .auth--signup .auth__card {
    gap: var(--space-7);
    max-width: 620px;
    padding: 0;
  }

  .auth--signup .auth__brand-mark {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-xl);
  }
  .auth--signup .auth__brand-mark .icon {
    --icon-size: 28px;
  }

  .auth--signup .auth__title {
    font-size: 26px;
    line-height: 34px;
  }

  .auth--signup .auth__subtitle {
    font-size: 14px;
    line-height: 24px;
  }
}

@media (max-width: 767.98px) {
  .auth--login .auth__brand {
    display: none;
  }

  .auth__field-row > .spacer {
    display: none;
  }
}

/* ----- Language switch ----- */
.auth__form-side {
  position: relative;
}
.auth__lang {
  position: absolute;
  inset-block-start: var(--space-7);
  inset-inline-end: var(--space-7);
}
@media (min-width: 768px) {
  .auth__lang {
    inset-block-start: var(--space-10);
    inset-inline-end: var(--space-10);
  }
}
