.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns:
    minmax(360px, 0.9fr)
    minmax(480px, 1.1fr);
}

.auth-brand-panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 64px;
  color: #ffffff;
  background:
    radial-gradient(
      circle at 25% 15%,
      rgba(255, 255, 255, 0.20),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #7366ff 0%,
      #4e40c7 48%,
      #231c6f 100%
    );
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -240px;
  bottom: -260px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.035),
    0 0 0 140px rgba(255, 255, 255, 0.025);
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 34px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 17px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.brand-mark-small {
  width: 42px;
  height: 42px;
  margin: 0;
  border-color: rgba(103, 87, 232, 0.20);
  border-radius: 12px;
  color: var(--color-primary);
  background: rgba(103, 87, 232, 0.08);
}

.brand-eyebrow,
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-eyebrow {
  color: rgba(255, 255, 255, 0.70);
}

.brand-content h1 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(40px, 4vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.brand-description {
  max-width: 470px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.6;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 48px 30px;
  background: var(--color-background);
}

.auth-card {
  width: min(100%, 470px);
  padding: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 38px;
  font-weight: 800;
}

.auth-heading {
  margin-bottom: 30px;
}

.auth-heading .eyebrow {
  color: var(--color-primary);
}

.auth-heading h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.auth-heading p:last-child {
  margin: 12px 0 0;
  color: var(--color-muted);
  line-height: 1.55;
}

form {
  display: grid;
  gap: 19px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  outline: none;
  color: var(--color-text);
  background: #ffffff;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.field input:focus {
  border-color: var(--color-primary);
  box-shadow:
    0 0 0 4px rgba(103, 87, 232, 0.12);
}

.field input::placeholder {
  color: #a5a7b1;
}

.primary-button {
  min-height: 52px;
  margin-top: 5px;
  border: 0;
  border-radius: var(--radius-small);
  color: #ffffff;
  font-weight: 800;
  background: var(--color-primary);
  transition:
    transform 150ms ease,
    background 150ms ease;
}

.primary-button:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.switch-text {
  margin: 25px 0 0;
  color: var(--color-muted);
  font-size: 14px;
  text-align: center;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--color-primary);
  font-weight: 800;
  background: transparent;
}

.message {
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: var(--radius-small);
  font-size: 14px;
  line-height: 1.45;
}

.message.error {
  color: var(--color-error);
  background: var(--color-error-background);
}

@media (max-width: 900px) {
  .auth-layout {
    display: block;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-form-panel {
    min-height: 100vh;
  }

  .mobile-brand {
    display: flex;
  }
}

@media (max-width: 540px) {
  .auth-form-panel {
    padding: 20px;
  }

  .auth-card {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .auth-heading h2 {
    font-size: 28px;
  }
}