/* RT UI System – Auth layout. Visual layout only; colors/components come from app.css tokens. */
body.rt-auth-page {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--color-bg-page);
  color: var(--color-text);
}

.rt-auth-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--color-bg-surface);
}

.rt-auth-visual {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #333;
}

.rt-auth-slideshow,
.rt-auth-slide,
.rt-auth-overlay { position: absolute; inset: 0; }

.rt-auth-slide {
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  animation: rt-auth-crossfade 20s infinite ease-in-out;
  will-change: opacity, transform;
}

.rt-auth-slide:nth-child(1) { background-image: url("../auth-schmetterling.webp"); animation-delay: 0s; }
.rt-auth-slide:nth-child(2) { background-image: url("../auth-sonnenuntergang.webp"); animation-delay: 5s; }
.rt-auth-slide:nth-child(3) { background-image: url("../auth-waldweg.webp"); animation-delay: 10s; }
.rt-auth-slide:nth-child(4) { background-image: url("../auth-wasserfall.webp"); animation-delay: 15s; }

@keyframes rt-auth-crossfade {
  0% { opacity: 0; transform: scale(1.03); }
  5% { opacity: 1; }
  25% { opacity: 1; transform: scale(1.075); }
  30%, 100% { opacity: 0; transform: scale(1.09); }
}

.rt-auth-overlay {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7,12,18,.30) 0%, rgba(7,12,18,.16) 34%, rgba(7,12,18,.74) 100%),
    linear-gradient(90deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.02) 42%, rgba(0,0,0,.36) 100%);
}

.rt-auth-overlay::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(180deg, var(--rt-brand-blue) 0%, var(--rt-brand-teal) 35%, var(--rt-brand-green) 66%, var(--rt-brand-gold) 100%);
  opacity: .95;
}

.rt-auth-visual-content {
  position: relative;
  z-index: 2;
  min-height: 100%;
  padding: clamp(28px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

.rt-auth-copy {
  max-width: 640px;
  margin-top: auto;
  padding-bottom: clamp(12px, 6vh, 90px);
}

.rt-auth-eyebrow {
  margin: 0 0 16px;
  color: rgba(255,255,255,.78);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.rt-auth-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.7rem, 5vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.rt-auth-copy > p:last-child {
  margin: 24px 0 0;
  max-width: 540px;
  color: rgba(255,255,255,.82);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.6;
}

.rt-auth-visual-footer { margin: 0; color: rgba(255,255,255,.68); font-size: .88rem; }

.rt-auth-form-panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(32px, 5vw, 80px);
  background: linear-gradient(180deg, var(--color-bg-surface) 0%, var(--color-bg-page) 100%);
}

.rt-auth-theme {
  position: absolute;
  top: clamp(16px, 2vw, 28px);
  right: clamp(16px, 2vw, 28px);
  z-index: 3;
}

.rt-auth-card {
  width: min(100%, 470px);
  position: relative;
  padding: 38px;
  border: 1px solid var(--color-border);
  border-radius: 28px;
  background: color-mix(in srgb, var(--color-bg-surface) 96%, transparent);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.rt-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--rt-brand-blue) 0%, var(--rt-brand-teal) 35%, var(--rt-brand-green) 68%, var(--rt-brand-gold) 100%);
}

.rt-auth-logo-link { display: inline-flex; width: fit-content; margin-bottom: 42px; }
.rt-auth-logo { display: block; width: min(100%, 360px); height: auto; }
.rt-auth-logo-dark { display: block; }
.rt-auth-logo-light { display: none; }
html[data-theme="dark"] .rt-auth-logo-dark { display: none; }
html[data-theme="dark"] .rt-auth-logo-light { display: block; }

.rt-auth-header { margin-bottom: 30px; }
.rt-auth-header .rt-auth-eyebrow { margin-bottom: 12px; color: var(--color-primary); }
.rt-auth-header h2 { margin: 0; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.05; letter-spacing: -.04em; }
.rt-auth-header p:last-child { margin: 14px 0 0; color: var(--color-text-soft); line-height: 1.6; }

.rt-auth-form { display: grid; gap: 22px; min-width: 0; }
.rt-auth-field { display: grid; gap: 8px; min-width: 0; }
.rt-auth-field label { color: var(--color-text); font-size: .9rem; font-weight: 700; }
.rt-auth-field input { min-width: 0; min-height: 50px; padding: 13px 14px; border-radius: 12px; }

.rt-auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 1px solid #222;
  border-radius: 12px;
  background: #222;
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.rt-auth-submit:hover { background: #111; border-color: #111; }
.rt-auth-submit:active { transform: translateY(1px); }
html[data-theme="dark"] .rt-auth-submit { background: #f1f1f1; border-color: #f1f1f1; color: #222; }
html[data-theme="dark"] .rt-auth-submit:hover { background: #fff; border-color: #fff; }

.rt-auth-meta { margin: 26px 0 0; color: var(--color-text-soft); font-size: .8rem; line-height: 1.5; }

@media (max-width: 900px) {
  .rt-auth-shell { grid-template-columns: 1fr; }
  .rt-auth-visual { min-height: 40svh; }
  .rt-auth-visual-content { min-height: 40svh; }
  .rt-auth-copy { padding-bottom: 0; }
  .rt-auth-copy h1 { font-size: clamp(2.3rem, 9vw, 4rem); }
  .rt-auth-form-panel { min-height: 60svh; padding-top: 72px; }
}

@media (max-width: 520px) {
  .rt-auth-visual { display: none; }
  .rt-auth-form-panel { min-height: 100svh; padding: 72px 18px 28px; }
  .rt-auth-card { padding: 28px 24px; border-radius: 20px; }
  .rt-auth-logo-link { margin-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .rt-auth-slide { animation: none; opacity: 0; transform: none; }
  .rt-auth-slide:first-child { opacity: 1; }
}
