* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-width: 320px;
  background: #fff;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: #fff;
  color: #101010;
  font-family: 'Urbanist', sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.signup-layout {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(620px, 1.1fr);
  min-height: 100vh;
  min-height: 100svh;
}

.signup-visual {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 12, 12, 0.08), rgba(12, 12, 12, 0.72)),
    url('images/signup.jpeg?v=ai-20260827') center/cover no-repeat;
}

.signup-back {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: background 180ms ease, transform 180ms ease;
}

.signup-back:hover,
.signup-back:focus-visible {
  background: rgba(0, 0, 0, 0.55);
  transform: translateX(-2px);
}

.signup-visual__brand {
  position: absolute;
  right: 44px;
  bottom: 42px;
  left: 44px;
  color: #fff;
}

.signup-visual__brand a {
  display: inline-block;
  margin-bottom: 6px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
}

.signup-visual__brand p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.signup-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: clamp(42px, 5vw, 72px);
  background: #fff;
}

.signup-card {
  width: min(100%, 700px);
}

.signup-mobile-brand {
  display: none;
}

.signup-heading {
  margin-bottom: 34px;
}

.signup-heading h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  line-height: 1.15;
}

.signup-heading p {
  color: #3a3a3a;
  font-size: 0.98rem;
}

.signup-heading a {
  color: #183f34;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.signup-heading a:hover {
  text-decoration: underline;
}

#signupForm {
  display: grid;
  gap: 24px;
}

.signup-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 18px;
}

.input-group {
  display: grid;
  min-width: 0;
  gap: 9px;
  color: #111;
  font-size: 0.86rem;
  font-weight: 700;
}

.input-group > input,
.password-field {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  border: 1px solid #bdbdbd;
  border-radius: 8px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-group > input {
  padding: 0 17px;
}

.input-group > input:focus,
.password-field:focus-within {
  border-color: #183f34;
  box-shadow: 0 0 0 3px rgba(47, 95, 79, 0.12);
  outline: 0;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.password-field input {
  min-width: 0;
  height: 54px;
  padding: 0 6px 0 17px;
  border: 0;
  outline: 0;
}

.password-toggle {
  min-width: 52px;
  height: 38px;
  margin-right: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #2f2f2f;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle:hover {
  background: #f1f1f1;
  color: #101010;
}

.signup-submit {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: #171717;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease;
}

.signup-submit:hover {
  background: #2f5f4f;
}

.signup-submit:disabled,
.social-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 30px 0;
  color: #777;
  font-size: 0.86rem;
}

.divider::before,
.divider::after {
  height: 1px;
  background: #dedede;
  content: '';
}

.social-login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid #bdbdbd;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.social-btn:hover {
  border-color: #9e9e9e;
  background: #f7f7f7;
}

.social-btn__icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.social-btn__icon--apple {
  width: 21px;
  height: 21px;
}

.signup-terms {
  max-width: 470px;
  margin: 24px auto 0;
  color: #555;
  font-size: 0.74rem;
  line-height: 1.6;
  text-align: center;
}

.auth-message {
  padding: 11px 13px;
  border-radius: 6px;
  background: #edf5f1;
  color: #285040;
  font-size: 0.82rem;
  text-align: center;
}

.auth-message--error {
  background: #fff0f1;
  color: #a3192a;
}

@media (max-width: 1120px) {
  .signup-layout {
    grid-template-columns: minmax(330px, 0.75fr) minmax(540px, 1.25fr);
  }

  .signup-panel {
    padding: 46px 36px;
  }
}

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

  .signup-visual {
    position: relative;
    height: 220px;
    background-position: center 46%;
  }

  .signup-visual__brand {
    display: none;
  }

  .signup-back {
    top: 18px;
    left: 18px;
    width: 44px;
    height: 44px;
  }

  .signup-panel {
    min-height: calc(100svh - 220px);
    padding: 38px 24px 48px;
  }

  .signup-mobile-brand {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 700;
  }
}

@media (max-width: 620px) {
  .signup-visual {
    height: 180px;
  }

  .signup-panel {
    min-height: calc(100svh - 180px);
    padding: 32px 18px 42px;
  }

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

  .signup-heading h1 {
    font-size: 1.9rem;
  }

  .signup-fields,
  .social-login {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .signup-panel {
    padding: 28px 14px 38px;
  }

  .signup-heading {
    margin-bottom: 26px;
  }

  .signup-heading h1 {
    font-size: 1.72rem;
    overflow-wrap: anywhere;
  }

  #signupForm {
    gap: 20px;
  }

  .signup-fields {
    gap: 16px;
  }

  .input-group > input,
  .password-field,
  .signup-submit,
  .social-btn {
    min-height: 52px;
  }

  .password-field input {
    height: 50px;
  }

  .password-toggle {
    min-width: 46px;
    margin-right: 6px;
    font-size: 0.72rem;
  }
}

.signup-terms a {
  color: #183f34;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}