body.auth-page {
  min-height: 100dvh;
  margin: 0;
  color: var(--shell-ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(47, 124, 247, 0.14), transparent 30%),
    radial-gradient(circle at 84% 68%, rgba(143, 211, 255, 0.22), transparent 34%),
    linear-gradient(180deg, var(--shell-bg) 0%, #f5f9ff 58%, #f7fbff 100%);
  font-family: var(--shell-font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--shell-grid-line) 0 1px, transparent 1px 92px),
    linear-gradient(180deg, rgba(121, 150, 197, 0.06) 0 1px, transparent 1px 92px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.86), transparent 78%);
}

.auth-layout {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(392px, 430px);
  gap: 22px;
  align-items: center;
}

.auth-brand-panel,
.auth-card {
  border: 1px solid rgba(184, 204, 235, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.98)),
    var(--shell-card);
  box-shadow: var(--shell-shadow-stage);
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 34px;
  padding: 42px;
  border-radius: var(--shell-radius-2xl);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-brand-panel::before {
  width: 360px;
  height: 360px;
  right: -98px;
  top: -118px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(47, 124, 247, 0.17), transparent 66%);
}

.auth-brand-panel::after {
  inset: 0;
  background:
    linear-gradient(135deg, rgba(47, 124, 247, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 48%);
}

.auth-brand {
  position: relative;
  z-index: 1;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}

.auth-brand__mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 21px;
  background: linear-gradient(135deg, rgba(47, 124, 247, 0.98), rgba(143, 211, 255, 0.94));
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(47, 124, 247, 0.24);
  font-family: var(--shell-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.auth-brand__copy {
  display: grid;
  gap: 4px;
}

.auth-brand__copy strong {
  color: var(--shell-ink);
  font-family: var(--shell-font-display);
  font-size: clamp(2rem, 3.1vw, 2.85rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.auth-brand__copy span {
  color: var(--shell-ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-brand-panel__copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 610px;
  display: grid;
  gap: 14px;
}

.auth-eyebrow {
  margin: 0;
  color: var(--shell-ink-dim);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-brand-panel__copy h1,
.auth-card__header h2 {
  margin: 0;
  color: var(--shell-ink);
  font-family: var(--shell-font-display);
  letter-spacing: -0.05em;
}

.auth-brand-panel__copy h1 {
  font-size: clamp(2rem, 2.8vw, 2.7rem);
  line-height: 1.18;
}

.auth-brand-panel__copy p:last-child,
.auth-card__header p,
.auth-field span,
.auth-check__copy span {
  margin: 0;
  color: var(--shell-ink-soft);
  line-height: 1.65;
}

.auth-brand-panel__copy p:last-child {
  max-width: 520px;
  font-size: 1rem;
}

.auth-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: grid;
  gap: 24px;
  padding: 34px;
  border-radius: 26px;
  backdrop-filter: blur(20px) saturate(150%);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #2f7cf7, #61bef4);
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-card__header {
  display: grid;
  gap: 9px;
}

.auth-card__header h2 {
  font-size: 2rem;
  line-height: 1.14;
}

.auth-card__header p {
  font-size: 0.95rem;
}

.auth-card__error {
  padding: 13px 15px;
  border: 1px solid rgba(196, 81, 74, 0.24);
  border-radius: 16px;
  background: rgba(196, 81, 74, 0.08);
  color: var(--shell-danger);
  line-height: 1.5;
}

.auth-form,
.auth-field {
  display: grid;
  gap: 10px;
}

.auth-form {
  gap: 16px;
}

.auth-field span {
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-field__control {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid rgba(180, 200, 232, 0.72);
  border-radius: 16px;
  background: #ffffff;
  color: var(--shell-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-field__control:focus {
  border-color: rgba(47, 124, 247, 0.72);
  outline: none;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(47, 124, 247, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.auth-remember {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(180, 200, 232, 0.56);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
}

.auth-remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-remember__box {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 124, 247, 0.42);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.auth-remember__box::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -1px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: rotate(-45deg);
}

.auth-remember input:checked + .auth-remember__box {
  border-color: rgba(47, 124, 247, 0.88);
  background: linear-gradient(135deg, #2f7cf7, #61bef4);
}

.auth-remember input:checked + .auth-remember__box::after {
  opacity: 1;
}

.auth-remember:focus-within {
  border-color: rgba(47, 124, 247, 0.66);
  box-shadow: 0 0 0 4px rgba(47, 124, 247, 0.1);
}

.auth-remember__copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.auth-remember__copy strong {
  color: var(--shell-ink);
  font-size: 0.9rem;
}

.auth-remember__copy small {
  color: var(--shell-ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.auth-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(180, 200, 232, 0.7);
  border-radius: 18px;
  background: rgba(243, 248, 255, 0.94);
}

.auth-check__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.auth-check__copy strong {
  color: var(--shell-ink);
  font-size: 0.92rem;
}

.auth-check__copy span {
  font-size: 0.82rem;
}

.auth-check__copy span[data-tone="success"] {
  color: var(--shell-ok);
}

.auth-check__copy span[data-tone="danger"] {
  color: var(--shell-danger);
}

.auth-check__copy span[data-tone="pending"] {
  color: var(--shell-warning);
}

.auth-check__button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(47, 124, 247, 0.24);
  border-radius: 15px;
  background: #ffffff;
  color: var(--shell-accent);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shell-shadow-soft);
}

.auth-check__button[disabled] {
  cursor: not-allowed;
  opacity: 0.64;
}

.auth-check__icon {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.auth-check__button[data-verified="true"] {
  color: var(--shell-ok);
  border-color: rgba(28, 157, 113, 0.26);
}

.auth-check__button[data-verified="true"] .auth-check__icon {
  border-color: var(--shell-ok);
  background: var(--shell-ok);
  box-shadow: inset 0 0 0 3px #ffffff;
}

.auth-submit {
  width: 100%;
  min-height: 54px;
  justify-content: center;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.52);
  background: linear-gradient(135deg, #2f7cf7 0%, #4b9bff 54%, #61bef4 100%);
  color: #ffffff;
  box-shadow:
    0 14px 24px rgba(47, 124, 247, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.auth-submit[disabled] {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

@media (max-width: 980px) {
  .auth-layout {
    width: min(560px, calc(100% - 32px));
    grid-template-columns: 1fr;
    gap: 18px;
    align-content: center;
    padding: 26px 0;
  }

  .auth-brand-panel {
    min-height: 0;
    gap: 28px;
    padding: 30px;
  }

  .auth-brand-panel__copy {
    align-self: start;
    gap: 10px;
  }

  .auth-brand-panel__copy h1 {
    font-size: clamp(1.7rem, 7vw, 2.25rem);
  }
}

@media (max-width: 520px) {
  .auth-layout {
    width: calc(100% - 28px);
  }

  .auth-brand-panel,
  .auth-card {
    border-radius: 24px;
  }

  .auth-brand-panel {
    padding: 24px;
  }

  .auth-brand {
    gap: 14px;
  }

  .auth-brand__mark {
    width: 54px;
    height: 54px;
    border-radius: 17px;
  }

  .auth-brand__copy strong {
    font-size: 1.78rem;
  }

  .auth-card {
    padding: 24px;
  }

  .auth-card__header h2 {
    font-size: 1.72rem;
  }

  .auth-check {
    grid-template-columns: 1fr;
  }

  .auth-check__button {
    width: 100%;
  }
}
