/* Pavalet auth pages (sign in + register). Split-screen brand panel + form. */
.auth-page,
.auth-page * {
  box-sizing: border-box;
}

.auth-page {
  --auth-field: #FAFAF8;
  --auth-field-border: var(--color-border);
  --auth-field-border-strong: rgba(138, 106, 32, 0.4);
  --auth-danger: #8F2D2D;
  --auth-danger-bg: rgba(173, 63, 63, 0.08);
  --auth-danger-border: rgba(173, 63, 63, 0.24);
}

html[data-theme="dark"] .auth-page {
  --auth-field: rgba(255, 255, 255, 0.04);
  --auth-field-border: rgba(255, 255, 255, 0.12);
  --auth-field-border-strong: rgba(232, 212, 139, 0.45);
  --auth-danger: #E8A0A0;
  --auth-danger-bg: rgba(173, 63, 63, 0.18);
  --auth-danger-border: rgba(232, 160, 160, 0.3);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100dvh - 88px);
}

/* Brand showcase panel */
.auth-aside {
  display: none;
  overflow: hidden;
  position: relative;
}

.auth-aside::before {
  background: var(--auth-bg-image) center / cover no-repeat;
  content: "";
  inset: 0;
  position: absolute;
}

.auth-aside__overlay {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.48) 36%, rgba(0, 0, 0, 0.2) 70%, rgba(0, 0, 0, 0.35) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.36) 0%, rgba(0, 0, 0, 0.24) 48%, rgba(0, 0, 0, 0.58) 100%);
  inset: 0;
  position: absolute;
}

html[data-theme="dark"] .auth-aside__overlay {
  background:
    linear-gradient(90deg, rgba(18, 15, 12, 0.76) 0%, rgba(18, 15, 12, 0.54) 36%, rgba(18, 15, 12, 0.26) 70%, rgba(18, 15, 12, 0.46) 100%),
    linear-gradient(to bottom, rgba(26, 23, 20, 0.56) 0%, rgba(26, 23, 20, 0.42) 48%, rgba(26, 23, 20, 0.78) 100%);
}

.auth-aside__content {
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  height: 100%;
  justify-content: center;
  padding: clamp(2.5rem, 5vw, 4rem);
  position: relative;
  z-index: 1;
}

.auth-aside__brand {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-aside__wordmark {
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  line-height: 1;
}

.auth-aside__rule {
  align-items: center;
  display: flex;
  gap: 0.3rem;
}

.auth-aside__rule i {
  background: var(--color-gold-light);
  height: 0.35rem;
  transform: rotate(45deg);
  width: 0.35rem;
}

.auth-aside__tagline {
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}

.auth-aside__points {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-aside__point {
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  font-size: 0.95rem;
  gap: 0.75rem;
  line-height: 1.4;
}

.auth-aside__point svg {
  color: var(--color-gold-light);
  flex: none;
}

/* Form side */
.auth-main {
  align-items: center;
  background: var(--color-bg);
  display: flex;
  justify-content: center;
  padding: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
}

.auth-card {
  animation: auth-enter 0.35s ease-out both;
  max-width: 26rem;
  width: 100%;
}

.auth-eyebrow {
  color: var(--color-gold-dark);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

html[data-theme="dark"] .auth-eyebrow {
  color: var(--color-gold-light);
}

.auth-title {
  color: var(--color-fg);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0.6rem 0 0.65rem;
  text-wrap: balance;
}

.auth-lede {
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  text-wrap: pretty;
}

.auth-alert {
  background: var(--auth-danger-bg);
  border: 1px solid var(--auth-danger-border);
  border-radius: 0.75rem;
  color: var(--auth-danger);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
}

.auth-notice {
  background: color-mix(in srgb, var(--color-gold), transparent 90%);
  border: 1px solid color-mix(in srgb, var(--color-gold-dark), transparent 72%);
  border-radius: 0.75rem;
  color: var(--color-fg);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
}

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

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

.auth-label-row {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.auth-label {
  color: var(--color-fg);
  font-size: 0.86rem;
  font-weight: 650;
}

.auth-label-link {
  color: var(--color-gold-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

html[data-theme="dark"] .auth-label-link {
  color: var(--color-gold-light);
}

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

.auth-input {
  background: var(--auth-field);
  border: 1px solid var(--auth-field-border);
  border-radius: 0.65rem;
  color: var(--color-fg);
  font: inherit;
  font-size: 1rem;
  min-height: 3.15rem;
  padding: 0 0.95rem;
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
}

.auth-input::placeholder {
  color: color-mix(in srgb, var(--color-muted), transparent 20%);
}

.auth-input:focus-visible {
  border-color: var(--auth-field-border-strong);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.16);
  outline: 0;
}

.auth-hint {
  color: var(--color-muted);
  font-size: 0.8rem;
  margin: 0;
}

.auth-consent {
  align-items: start;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto 1fr;
}

.auth-consent__checkbox {
  accent-color: var(--color-gold-dark);
  height: 1.2rem;
  margin: 0.15rem 0 0;
  width: 1.2rem;
}

.auth-consent__checkbox:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-gold), transparent 35%);
  outline-offset: 3px;
}

.auth-consent__label {
  color: var(--color-muted);
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.55;
}

.auth-consent__label a {
  color: var(--color-gold-dark);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

html[data-theme="dark"] .auth-consent__checkbox {
  accent-color: var(--color-gold-light);
}

html[data-theme="dark"] .auth-consent__label a {
  color: var(--color-gold-light);
}

.auth-footnote {
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1.5rem 0 0;
}

.auth-footnote a {
  color: var(--color-gold-dark);
  font-weight: 700;
  text-underline-offset: 0.18em;
}

html[data-theme="dark"] .auth-footnote a {
  color: var(--color-gold-light);
}

.auth-footnote a:hover {
  text-decoration: underline;
}

@media (min-width: 860px) {
  .auth-layout {
    grid-template-columns: 1.05fr 1fr;
  }

  .auth-aside {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card {
    animation: none;
  }
}

@keyframes auth-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
