/* Auth pages: login, register, confirm, forgot, reset */

.auth-page {
  background: var(--color-bg);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(360px, 46%) minmax(0, 1fr);
  min-height: 100vh;
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
  padding: 36px 42px;
  background: #0b0d0c;
  color: #f2f1ea;
}

.auth-brand-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.auth-brand-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(0.85) contrast(1.08);
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 13, 12, 0.58) 0%, rgba(11, 13, 12, 0.82) 48%, rgba(11, 13, 12, 0.96) 100%);
}

.auth-brand .brand {
  color: #f2f1ea;
}

/* Левая панель входа всегда тёмная, поэтому wordmark не должен зависеть
   от светлой темы сайта. */
.auth-brand .brand-word {
  color: #f2f1ea;
}

.auth-brand .brand-word-accent {
  color: #ffb435;
}

.auth-brand-copy {
  max-width: 430px;
  margin-top: auto;
  padding-block: 60px 34px;
}

.auth-brand-copy h1 {
  max-width: 12ch;
  color: #f2f1ea;
  font-size: clamp(2.5rem, 4.4vw, 4.4rem);
}

.auth-brand-copy p {
  max-width: 42ch;
  margin-top: 18px;
  color: #c1c7bf;
  font-size: 0.96rem;
  line-height: 1.6;
}

.auth-brand-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(242, 241, 234, 0.18);
  color: rgba(242, 241, 234, 0.55);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-inline: clamp(24px, 5vw, 72px);
  background: var(--color-bg);
}

.auth-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--transition);
}

.auth-back:hover {
  color: var(--color-brand);
}

.auth-card {
  width: min(100%, 460px);
  margin: auto;
  padding-block: 28px 48px;
}

.auth-card h1 {
  margin-top: 10px;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
}

.auth-lead {
  margin-top: 12px;
  color: var(--color-text-muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

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

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

.auth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.auth-row > a {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.auth-row > a:hover {
  color: var(--color-brand);
}

.password-field {
  position: relative;
}

.password-field .input {
  padding-right: 84px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--color-text);
}

.auth-switch {
  margin-top: 24px;
  color: var(--color-text-muted);
  font-size: 0.83rem;
  line-height: 1.5;
  text-align: center;
}

.auth-switch a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-switch a:hover {
  color: var(--color-brand);
}

.auth-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-subtle);
  font-size: 0.74rem;
  line-height: 1.5;
}

.auth-note a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-note a:hover {
  color: var(--color-brand);
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-subtle);
  font-size: 0.68rem;
}

.auth-footer a {
  color: var(--color-text-muted);
}

.auth-footer a:hover {
  color: var(--color-brand);
}

.auth-status {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.auth-status-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--color-surface-2);
  color: var(--color-brand);
}

.auth-status-icon svg {
  width: 25px;
  height: 25px;
}

.auth-status h1 {
  margin-top: 0;
}

.auth-status .btn {
  margin-top: 6px;
}

.auth-help {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.auth-help strong {
  color: var(--color-text);
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 230px;
    padding: 22px 22px 20px;
  }

  .auth-brand-copy {
    padding-block: 24px 0;
  }

  .auth-brand-copy h1 {
    max-width: 18ch;
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .auth-brand-copy p,
  .auth-brand-meta {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding-inline: 22px;
  }

  .auth-panel-top {
    padding-block: 18px;
  }

  .auth-card {
    margin: 0 auto;
    padding-block: 20px 44px;
  }
}

@media (max-width: 520px) {
  .auth-brand {
    min-height: 205px;
  }

  .auth-brand .brand {
    font-size: 1.32rem;
  }

  .auth-brand-copy h1 {
    font-size: clamp(1.8rem, 8vw, 2.3rem);
  }

  .auth-card h1 {
    font-size: clamp(1.9rem, 8vw, 2.4rem);
  }

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

  .auth-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
