/* ──────────────────────────────────────────────────────────────────────
   auth.css — стили страниц login + register (общий split-layout)
   ────────────────────────────────────────────────────────────────────── */

/* ── общий split-layout ──────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: stretch;
  padding: 0;
}
.reg-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: stretch;
  padding: 0;
}

/* левая декоративная панель — общая для login + register */
.auth-side,
.reg-side {
  position: sticky; top: 0;
  height: calc(100vh + 50px);
  overflow: hidden;
  padding: 64px;
  display: flex; flex-direction: column; justify-content: center;
}
.side-group {
  display: flex; flex-direction: column; gap: 24px;
  transform: translateY(50px);
}
.auth-side { background: linear-gradient(170deg, var(--hero-warm-2), var(--hero-warm-3)); }
.reg-side  { background: linear-gradient(170deg, var(--hero-warm-2), var(--hero-warm-3)); }

.auth-side .blob,
.reg-side .blob {
  position: absolute; inset: -10%;
  filter: blur(60px);
}
.auth-side .blob::before, .auth-side .blob::after,
.reg-side  .blob::before, .reg-side  .blob::after {
  content: ''; position: absolute; border-radius: 50%;
}
.auth-side .blob::before, .reg-side .blob::before {
  width: 70%; height: 70%; top: 5%; left: 8%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent-deep) 60%, transparent), transparent 60%);
  animation: drift1 38s ease-in-out infinite alternate;
}
.auth-side .blob::after, .reg-side .blob::after {
  width: 60%; height: 60%; bottom: 0; right: 5%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent-soft) 80%, transparent), transparent 60%);
  animation: drift2 46s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0,0) scale(1); }    to { transform: translate(8%,6%) scale(1.12); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.05); } to { transform: translate(-7%,-5%) scale(0.95); } }

.auth-side .meta,
.reg-side  .meta {
  color: color-mix(in oklab, var(--text) 90%, transparent);
  font-family: ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  position: relative; z-index: 1;
}
[data-theme="dark"] .auth-side .meta,
[data-theme="dark"] .reg-side .meta { color: color-mix(in oklab, #F3EEE8 85%, transparent); }

.auth-side .quote,
.reg-side  .quote {
  position: relative; z-index: 1;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: clamp(34px, 3.6vw, 52px); line-height: 1.1;
  color: var(--text); max-width: 14ch;
}
[data-theme="dark"] .auth-side .quote,
[data-theme="dark"] .reg-side .quote { color: #F3EEE8; }
.auth-side .quote .em,
.reg-side  .quote .em { color: color-mix(in oklab, var(--text) 55%, transparent); font-style: normal; }

/* ── login form ──────────────────────────────────────────────────────── */
.auth-form {
  padding: 120px 64px 80px;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 540px;
}
.auth-form h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 56px; line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.auth-form h1 .em { font-style: italic; color: var(--text-muted); }
.auth-form .lede { color: var(--text-muted); margin-bottom: 48px; max-width: 36ch; }

.auth-fields { display: flex; flex-direction: column; gap: 28px; margin-bottom: 32px; }

.divider {
  display: flex; align-items: center; gap: 16px;
  color: var(--text-soft); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  margin: 36px 0;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.alt-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text);
  transition: background 300ms ease, border-color 300ms ease;
}
.alt-link:hover { background: var(--surface); border-color: var(--text); }
.alt-link .ttl { font-family: 'Instrument Serif', serif; font-size: 19px; font-style: italic; }
.alt-link .sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

.tail { margin-top: 36px; color: var(--text-muted); font-size: 14px; }

/* ── register form ───────────────────────────────────────────────────── */
.reg-form { padding: 120px 64px 80px; max-width: 600px; }
.reg-form h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 56px; line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.reg-form h1 .em { font-style: italic; color: var(--text-muted); }
.reg-form .lede { color: var(--text-muted); margin-bottom: 48px; max-width: 40ch; }

.fields { display: flex; flex-direction: column; gap: 28px; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; color: var(--text-muted); line-height: 1.5;
}
.checkbox-row input { margin-top: 4px; accent-color: var(--text); }

.actions-row {
  display: flex; align-items: center; gap: 24px;
  margin-top: 14px; flex-wrap: wrap;
}

.principles {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.principles .eyebrow { margin-bottom: 18px; }
.principles ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.principles li {
  display: flex; gap: 14px; align-items: baseline;
  color: var(--text-muted); font-size: 14px; line-height: 1.55;
}
.principles li::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; transform: translateY(-2px);
}

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .auth-shell, .reg-shell { grid-template-columns: 1fr; }
  .auth-side, .reg-side {
    min-height: 240px;
    height: auto;
    padding: 102px 32px 32px;
    justify-content: space-between;
    position: relative;
    top: auto;
  }
  .auth-form, .reg-form { padding: 56px 22px; }
  .side-group { gap: 8px; transform: none; }
}

/* pull auth/reg shells under transparent navbar — but NOT when a
   flash message is showing. has-messages is added to <body> by base.html
   whenever {% if messages %} is true — more reliable than CSS :has(). */
.transparent-nav .reg-shell,
.transparent-nav .auth-shell {
  margin-top: -80px;
}
.transparent-nav.has-messages .reg-shell,
.transparent-nav.has-messages .auth-shell {
  margin-top: 0;
}

/* on mobile the auth-side has 102px top padding to clear the transparent
   topbar — reduce it when messages already occupy that space above */
@media (max-width: 880px) {
  .transparent-nav.has-messages .auth-side,
  .transparent-nav.has-messages .reg-side {
    padding-top: 32px;
  }
}
