.rinata-auth {
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(223, 245, 249, 0.9) 0 42%, transparent 42%),
    #f8fbfc;
}

.rinata-auth .auth-shell {
  width: min(100%, 1080px);
  min-height: 100vh;
  padding: 0;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  background: #ffffff;
}

.auth-visual {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  background: #dff3f6;
}

.auth-brand {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 20px;
  color: #268da0;
  font-family: var(--font-family-logo);
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 14px rgba(255, 255, 255, 0.65);
}

.auth-brand span {
  margin-left: 3px;
  color: #f09b9f;
  font-family: var(--font-family-ui);
  font-size: 15px;
  vertical-align: top;
}

.auth-character {
  position: absolute;
  inset: 0;
}

.auth-character::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(235, 250, 252, 0.98) 0%,
    rgba(235, 250, 252, 0.76) 42%,
    rgba(235, 250, 252, 0.04) 72%
  );
  content: "";
}

.auth-character img {
  position: absolute;
  right: -4px;
  width: 62%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
}

.auth-visual-register .auth-character img {
  right: 0;
  width: 100%;
  object-position: 50% 12%;
}

.auth-visual-register .auth-character::after {
  background: linear-gradient(
    180deg,
    rgba(225, 246, 249, 0.18) 0%,
    rgba(225, 246, 249, 0.02) 46%,
    rgba(225, 246, 249, 0.08) 100%
  );
}

.auth-welcome-copy {
  position: absolute;
  z-index: 1;
  bottom: 24px;
  left: 20px;
  width: min(54%, 250px);
}

.auth-welcome-copy h1 {
  margin-bottom: 8px;
  color: #16384a;
  font-size: 20px;
  line-height: 1.3;
}

.auth-welcome-copy p {
  margin: 0;
  color: #38596a;
  font-size: 14px;
  line-height: 1.55;
}

.auth-panel {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 24px 20px 36px;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 4px;
  border: 1px solid #dce9ea;
  border-radius: 8px;
  padding: 4px;
  background: #f4f8f8;
}

.auth-switch a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 8px 10px;
  color: #61737c;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.auth-switch a:hover {
  color: #255b67;
  text-decoration: none;
}

.auth-switch a.is-active {
  color: #ffffff;
  background: #2b94a5;
  box-shadow: 0 4px 12px rgba(43, 148, 165, 0.18);
}

.auth-heading {
  display: grid;
  gap: 8px;
}

.auth-heading h1,
.auth-heading h2 {
  margin: 0;
  color: #17364a;
  font-size: 26px;
}

.auth-heading p {
  margin: 0;
  color: #637984;
  font-size: 14px;
}

.auth-heading .auth-eyebrow {
  color: #2b8492;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  gap: 7px;
  color: #304f5e;
}

.auth-form input {
  min-height: 48px;
  border-radius: 8px;
  background: #fbfdfd;
}

.auth-form input:hover {
  border-color: #aecfd3;
}

.auth-form input:focus {
  border-color: #2b94a5;
  outline: 3px solid rgba(43, 148, 165, 0.14);
}

.auth-role {
  display: grid;
  min-width: 0;
  gap: 7px;
  margin: 0;
  border: 0;
  padding: 0;
}

.auth-role legend {
  margin-bottom: 7px;
  padding: 0;
  color: #304f5e;
  font-size: 14px;
  font-weight: 700;
}

.auth-role-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-role-option {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d4e3e5;
  border-radius: 8px;
  padding: 8px 12px;
  color: #58707b;
  background: #fbfdfd;
  cursor: pointer;
}

.auth-role-option:hover {
  border-color: #aecfd3;
}

.auth-role-option:has(input:checked) {
  border-color: #2b94a5;
  color: #255b67;
  background: #eaf7f8;
  box-shadow: inset 0 0 0 1px #2b94a5;
}

.auth-form .auth-role-option input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #2b94a5;
}

.auth-role-option:has(input:focus-visible) {
  outline: 3px solid rgba(43, 148, 165, 0.18);
  outline-offset: 2px;
}

.auth-form .errorlist,
.auth-form-errors .errorlist {
  margin: 0;
  padding: 0;
  color: #a84f58;
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
}

.auth-form-errors {
  border-left: 3px solid #df9299;
  border-radius: 4px;
  padding: 10px 12px;
  color: #873f47;
  background: #fff4f5;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  background: #2b94a5;
}

.auth-alternate {
  margin: 0;
  color: #75868e;
  font-size: 14px;
  text-align: center;
}

.auth-alternate a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

@media (min-width: 760px) {
  .rinata-auth {
    display: grid;
    place-items: start center;
    padding: 32px;
  }

  .rinata-auth .auth-shell {
    width: min(100%, 980px);
    min-height: 640px;
    margin-block: auto;
  }

  .auth-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    min-height: 640px;
    overflow: hidden;
    border: 1px solid #dce9ea;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(47, 91, 102, 0.15);
  }

  .auth-visual {
    min-height: 640px;
  }

  .auth-brand {
    top: 32px;
    left: 36px;
    font-size: 38px;
  }

  .auth-character img {
    right: 0;
    width: 100%;
    object-position: 50% 12%;
  }

  .auth-character::after {
    background: linear-gradient(
      180deg,
      rgba(225, 246, 249, 0.22) 0%,
      rgba(225, 246, 249, 0.04) 38%,
      rgba(225, 246, 249, 0.16) 100%
    );
  }

  .auth-welcome-copy {
    bottom: 44px;
    left: 36px;
    width: min(78%, 390px);
  }

  .auth-welcome-copy h1 {
    font-size: 30px;
  }

  .auth-welcome-copy p {
    font-size: 16px;
  }

  .auth-panel {
    align-content: center;
    gap: 28px;
    padding: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-switch a,
  .auth-submit,
  .auth-form input {
    scroll-behavior: auto;
    transition: none;
  }
}
