/* =====================================================================
   Anmeldung, Ersteinrichtung, Passwortwechsel
   Links: schwarze Fläche (immer dunkel), rechts: Formular
   ===================================================================== */
.auth {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr);
  background: var(--bg);
}

/* ---------- Schwarze Fläche ---------- */
.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 52px;
  background: #050505;
  color: #f5f5f6;
  border-right: 1px solid var(--line);
  isolation: isolate;
}
.auth-visual-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 85% 15%, rgba(255, 255, 255, .09), transparent 60%),
    radial-gradient(700px 500px at 10% 100%, rgba(255, 255, 255, .06), transparent 60%),
    #050505;
  background-size: cover;
  background-position: center;
  filter: grayscale(1);
}
.auth-visual-bg[style*="url"] { opacity: .45; }
.auth-visual::after {
  /* feines Linienraster */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
.auth-watermark {
  position: absolute;
  right: -12%;
  top: 50%;
  width: min(62vh, 640px);
  transform: translateY(-50%);
  opacity: .07;
  filter: grayscale(1) brightness(2.2);
  z-index: -1;
  pointer-events: none;
  user-select: none;
}
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-seal { width: 46px; height: 46px; filter: grayscale(1) brightness(1.6) contrast(1.1); }
.auth-brand-name { font-weight: 600; font-size: 15px; letter-spacing: .01em; }
.auth-brand-sub { font-size: 12.5px; color: rgba(245, 245, 246, .55); }
.auth-hero { max-width: 560px; }
.auth-hero h1 {
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 600;
  margin: 0 0 18px;
}
.auth-hero p { font-size: 17px; line-height: 1.55; color: rgba(245, 245, 246, .62); margin: 0; max-width: 440px; }
.auth-clock { display: flex; align-items: baseline; gap: 16px; }
.auth-time { font-size: 44px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.auth-date { font-size: 14px; color: rgba(245, 245, 246, .55); }

/* ---------- Formularseite ---------- */
.auth-main {
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  min-width: 0;
}
.auth-top { display: flex; justify-content: flex-end; }
.auth-panel {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 40px 0;
  animation: rise .35s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.auth-eyebrow { font-size: 13px; font-weight: 500; color: var(--text-dim); margin-bottom: 8px; }
.auth-title { font-size: 34px; letter-spacing: -.03em; margin: 0 0 8px; }
.auth-subtitle { color: var(--text-dim); margin: 0 0 28px; font-size: 15px; }
.auth-form .field input { padding: 12px 14px; font-size: 15px; }
.auth-form .btn-lg { margin-top: 6px; }
.auth-help { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--text-dim); }
.auth-foot { text-align: center; font-size: 12px; color: var(--text-faint); }

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex: none;
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--hover); border-color: var(--line-strong); }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text); }

/* Fehlerseite „Portal nicht erreichbar“ */
.screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.scroll-center { width: 100%; display: flex; justify-content: center; }
.card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }

/* ---------- Tablet / Handy ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-visual { padding: 24px 22px 26px; gap: 22px; }
  .auth-hero h1 { font-size: clamp(26px, 7vw, 36px); margin-bottom: 8px; }
  .auth-hero p { font-size: 14.5px; }
  .auth-clock { display: none; }
  .auth-watermark { width: 300px; right: -70px; }
  .auth-main { padding: 12px 16px 20px; }
  .auth-top { position: absolute; top: 18px; right: 16px; }
  .auth-top .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
  .auth-panel { padding: 20px 0 28px; margin: 0 auto; }
  .auth-title { font-size: 28px; }
}
@media (max-width: 520px) {
  .row { flex-direction: column; gap: 0; }
  .auth-hero p { display: none; }
}
