.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(1rem, 4vw, 3.5rem);
  background:
    radial-gradient(ellipse at 5% 5%, rgb(216 56 60 / 8%), transparent 30%),
    #f4f7f0;
  color: #17261b;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.auth-shell {
  display: grid;
  width: min(100%, 68rem);
  min-height: min(43rem, calc(100vh - 3rem));
  grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid rgb(220 231 215 / 90%);
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 1.5rem 5rem rgb(23 59 43 / 14%);
}

.auth-shell-register {
  min-height: min(49rem, calc(100vh - 3rem));
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(1.75rem, 4vw, 3rem);
  isolation: isolate;
  color: #fff;
  background-color: #173b2b;
  background-image:
    linear-gradient(145deg, rgb(23 59 43 / 96%), rgb(23 59 43 / 88%) 55%, rgb(91 24 31 / 90%)),
    url("../images/background/bg1.jpg");
  background-position: center;
  background-size: cover;
}

.auth-visual::before,
.auth-visual::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgb(255 255 255 / 17%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.auth-visual::before {
  right: -9rem;
  bottom: 5%;
  width: 25rem;
  aspect-ratio: 1;
  box-shadow: 0 0 0 2.2rem rgb(216 56 60 / 12%), 0 0 0 5rem rgb(255 255 255 / 5%);
}

.auth-visual::after {
  right: 17%;
  bottom: 22%;
  width: 8rem;
  aspect-ratio: 1;
  border-color: rgb(216 56 60 / 68%);
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0;
  background: transparent;
}

.auth-brand img {
  display: block;
  width: min(11.7rem, 55vw);
  height: auto;
  filter: drop-shadow(0 2px 8px rgb(0 0 0 / 18%));
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 27rem;
  padding-block: 3rem;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #c52f35;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.auth-visual .auth-eyebrow {
  color: #fff;
}

.auth-visual .auth-eyebrow > span {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #ef6266;
  box-shadow: 0 0 0 0.25rem rgb(216 56 60 / 25%);
}

.auth-visual-copy h1 {
  max-width: 11ch;
  margin: 1.1rem 0 0;
  color: #fff;
  font-size: clamp(2.2rem, 4.2vw, 3.5rem);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.auth-visual-copy p {
  max-width: 25rem;
  margin: 1.1rem 0 0;
  color: rgb(255 255 255 / 82%);
  font-size: 0.95rem;
  line-height: 1.75;
}

.auth-visual-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgb(255 255 255 / 86%);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-visual-footer > span {
  width: 1.8rem;
  height: 0.16rem;
  border-radius: 999px;
  background: #e64a4f;
}

.auth-panel {
  display: grid;
  align-items: center;
  padding: clamp(1.5rem, 5vw, 4.5rem);
  background:
    radial-gradient(ellipse at 100% 0%, rgb(216 56 60 / 5%), transparent 31%),
    #fff;
}

.auth-panel-inner {
  width: min(100%, 27rem);
  margin-inline: auto;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #647266;
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 160ms ease;
}

.auth-back-link:hover {
  color: #c52f35;
}

.auth-heading {
  margin-block: 2.6rem 1.8rem;
}

.auth-heading h2 {
  margin: 0.6rem 0 0;
  color: #17261b;
  font-size: clamp(1.8rem, 3.5vw, 2.45rem);
  font-weight: 820;
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.auth-heading p {
  margin: 0.7rem 0 0;
  color: #647266;
  font-size: 0.88rem;
  line-height: 1.65;
}

.auth-messages {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.auth-message {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid #f0d8d7;
  border-radius: 0.65rem;
  color: #a92931;
  background: #fff5f4;
  font-size: 0.8rem;
  line-height: 1.5;
}

.auth-message-success {
  border-color: #dce7d7;
  color: #315238;
  background: #f1f7ed;
}

.auth-form {
  display: grid;
  gap: 1.1rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field label {
  color: #29372e;
  font-size: 0.78rem;
  font-weight: 750;
}

.auth-field input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #dce7d7;
  border-radius: 0.65rem;
  outline: none;
  color: #17261b;
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field input:hover {
  border-color: #a9bca4;
}

.auth-field input:focus {
  border-color: #d8383c;
  box-shadow: 0 0 0 3px rgb(216 56 60 / 12%);
}

.auth-field-error {
  color: #a92931;
  font-size: 0.75rem;
  line-height: 1.45;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: -0.1rem;
  color: #647266;
  font-size: 0.75rem;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.auth-remember input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #d8383c;
}

.auth-form-options > a,
.auth-switch a {
  color: #c52f35;
  font-weight: 750;
  text-decoration: none;
}

.auth-form-options > a:hover,
.auth-switch a:hover {
  color: #a92931;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.auth-submit {
  display: flex;
  min-height: 3.15rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
  padding: 0.8rem 1rem 0.8rem 1.2rem;
  border: 0;
  border-radius: 0.65rem;
  color: #fff;
  background: linear-gradient(110deg, #c52f35, #d8383c);
  box-shadow: 0 0.55rem 1.25rem rgb(216 56 60 / 20%);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  background: linear-gradient(110deg, #a92931, #c52f35);
  box-shadow: 0 0.75rem 1.45rem rgb(216 56 60 / 26%);
}

.auth-submit:focus-visible,
.auth-back-link:focus-visible,
.auth-form-options a:focus-visible,
.auth-switch a:focus-visible {
  outline: 3px solid rgb(216 56 60 / 45%);
  outline-offset: 3px;
}

.auth-switch {
  margin: 1.6rem 0 0;
  color: #647266;
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 800px) {
  .auth-page {
    padding: 1rem;
  }

  .auth-shell,
  .auth-shell-register {
    width: min(100%, 35rem);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-visual {
    min-height: 15rem;
    padding: 1.4rem 1.6rem;
  }

  .auth-visual-copy {
    max-width: 31rem;
    padding-block: 1.7rem 1.1rem;
  }

  .auth-visual-copy h1 {
    max-width: 17ch;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
  }

  .auth-visual-copy p {
    margin-top: 0.6rem;
    font-size: 0.83rem;
  }

  .auth-visual-footer {
    font-size: 0.7rem;
  }

  .auth-panel {
    padding: clamp(1.4rem, 6vw, 2.5rem);
  }

  .auth-heading {
    margin-top: 1.8rem;
  }
}

@media (max-width: 420px) {
  .auth-page {
    padding: 0.65rem;
  }

  .auth-shell,
  .auth-shell-register {
    border-radius: 1rem;
  }

  .auth-visual {
    min-height: 13.5rem;
    padding: 1.15rem;
  }

  .auth-brand img {
    width: 10rem;
  }

  .auth-visual-copy {
    padding-block: 1.3rem 0.8rem;
  }

  .auth-visual-copy h1 {
    font-size: 1.85rem;
  }

  .auth-panel {
    padding: 1.25rem 1rem 1.5rem;
  }

  .auth-heading {
    margin-block: 1.5rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-back-link,
  .auth-field input,
  .auth-submit {
    transition: none;
  }
}
