.tenant-shell-page .auth-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.auth-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 10px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--nav-line);
  background: var(--color-sidebar-bg);
  color: var(--nav-text);
}

.tenant-shell-page .auth-masthead .brand {
  padding: 0;
}

.auth-masthead .theme-toggle {
  flex: none;
  width: 44px;
  height: 44px;
}

.tenant-shell-page .auth-shell .main-panel {
  flex: 1;
  padding: 0;
  isolation: isolate;
}

.auth-shell .main-panel::before {
  position: absolute;
  inset: 0 0 auto auto;
  z-index: -1;
  width: min(520px, 56%);
  aspect-ratio: 3 / 2;
  background: url("/assets/brand/auth-contours.webp") top right / contain no-repeat;
  opacity: .22;
  pointer-events: none;
  content: "";
}

:root[data-theme="dark"] .auth-shell .main-panel::before {
  opacity: .36;
}

.tenant-shell-page .auth-shell .auth-panel {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(36px, 5vw, 72px);
  width: min(1180px, calc(100% - 2 * clamp(24px, 5vw, 72px)));
  min-height: 0;
  margin-inline: auto;
  padding: clamp(56px, 12vh, 140px) 0 48px;
  place-items: stretch;
}

.auth-intro {
  min-width: 0;
}

.auth-intro h1 {
  max-width: 12ch;
  color: var(--text-primary);
  font-size: clamp(40px, 5.15vw, 75px);
  font-weight: 750;
  letter-spacing: -.052em;
  line-height: 1.03;
  overflow-wrap: anywhere;
}

.auth-intro p {
  max-width: 35ch;
  margin-block: 18px 14px;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding-inline-start: clamp(36px, 5vw, 72px);
  border-inline-start: 1px solid var(--color-border-strong);
}

.auth-form [data-auth-feedback] {
  margin: 0;
}

.auth-form [data-auth-feedback]:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.auth-field .field-label {
  margin-bottom: 7px;
  color: var(--text-primary);
  font-size: 15px;
}

.auth-field .input {
  min-height: 50px;
  border-color: var(--color-border-strong);
  background: var(--color-surface);
  font-size: 16px;
}

.auth-password {
  position: relative;
}

.auth-password .input {
  padding-inline-end: 54px;
}

.auth-password-toggle {
  position: absolute;
  inset: 50% 3px auto auto;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 19px;
  cursor: pointer;
}

.auth-password-toggle:hover {
  background: var(--color-surface-alt);
  color: var(--text-primary);
}

.auth-hint {
  margin-top: -11px;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-links {
  display: flex;
  align-items: center;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: 650;
  text-align: start;
  cursor: pointer;
}

.auth-link:hover {
  text-decoration: underline;
  text-underline-offset: .16em;
}

.auth-recovery-link {
  justify-content: flex-end;
  margin-block: -14px -6px;
}

.auth-code-link {
  justify-content: center;
  margin-top: -10px;
}

.tenant-shell-page .auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  font-size: 16px;
}

@media (max-width: 720px) {
  .auth-masthead {
    min-height: 64px;
  }

  .tenant-shell-page .auth-shell .auth-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    width: min(480px, calc(100% - 40px));
    padding-block: 32px 36px;
  }

  .auth-intro h1 {
    max-width: none;
    font-size: clamp(34px, 7vw, 46px);
  }

  .auth-intro p {
    margin-block: 10px 3px;
  }

  .auth-form {
    gap: 14px;
    padding-inline-start: 0;
    border-inline-start: 0;
  }
}
