
  html, body { height: 100%; }

  body {
    display: flex;
    min-height: 100vh;
    padding: 24px;
  }

  .card {
    /* margin auto statt align-items/justify-content am Body: zentriert genauso,
       schneidet aber bei Überlauf (Karte höher als Viewport) oben nichts ab.
       Kein overflow:hidden – sonst wird das Passwort-vergessen-Popover an der
       Kartenunterkante abgeschnitten; die Rundung übernimmt der Hero selbst. */
    margin: auto;
    display: flex;
    width: 100%;
    max-width: 980px;
    min-height: 600px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  }

  /* ---------- Hero ---------- */
  .hero {
    flex: 1 1 46%;
    position: relative;
    min-height: 320px;
    background: var(--bg);
    border-radius: 20px 0 0 20px;
    overflow: hidden;
  }
  .hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
  }
  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(8,12,22,0) 55%, var(--bg-panel) 100%),
                linear-gradient(to top, rgba(8,12,22,0.2), rgba(8,12,22,0) 25%);
  }

  /* ---------- Form side ---------- */
  .side {
    flex: 1 1 54%;
    display: flex;
    flex-direction: column;
    padding: 26px 52px 28px;
  }

  .lang-row {
    display: flex;
    justify-content: flex-end;
  }
  .lang-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }
  .lang-toggle button {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    transition: background .15s, color .15s;
  }
  .lang-toggle button.active {
    background: var(--accent);
    color: #fff;
  }
  .lang-toggle button:not(.active):hover { color: var(--text); }

  .form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
  }

  h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
  }
  h1 .blue { color: var(--accent); }

  .tagline {
    margin-top: 8px;
    margin-bottom: 26px;
    text-align: center;
    color: var(--text-dim);
    font-size: 15px;
  }

  label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 8px;
  }

  .field { margin-bottom: 22px; }

  .input-wrap { position: relative; }

  input[type="email"], input[type="password"], input[type="text"] {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 44px 13px 16px;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
  }
  input::placeholder { color: var(--text-faint); }
  input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
  }

  .toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
  }
  .toggle-pw:hover { color: var(--text-dim); }
  .toggle-pw svg { width: 20px; height: 20px; }

  .row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 13.5px;
    position: relative;  /* Anker für das Passwort-vergessen-Popover */
  }

  .remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
  }
  .remember input {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
  }

  a.forgot {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
  }
  a.forgot:hover { color: var(--accent-hover); text-decoration: underline; }

  .btn-login {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .15s, box-shadow .15s, transform .1s;
    box-shadow: 0 6px 24px var(--accent-glow);
  }
  .btn-login:hover { background: var(--accent-hover); }
  .btn-login:active { transform: scale(0.99); }
  .btn-login:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }
  .btn-login svg { width: 18px; height: 18px; transition: transform .15s; }
  .btn-login:hover svg { transform: translateX(3px); }

  .footnote {
    margin-top: 26px;
    text-align: center;
    color: var(--text-faint);
    font-size: 12.5px;
  }

  .error {
    display: none;
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.35);
    color: #FF8585;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13.5px;
    margin-bottom: 20px;
  }
  .error.show { display: block; }

  /* schwebt über dem Inhalt, verschiebt das Layout nicht */
  .hint {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 5;
    background: var(--bg-input);
    border: 1px solid rgba(45, 140, 255, 0.45);
    color: var(--text-dim);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13.5px;
    line-height: 1.45;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  }
  .hint.show { display: block; }

  /* ---------- Responsive ---------- */
  @media (max-width: 820px) {
    body { padding: 0; }
    .card {
      flex-direction: column;
      max-width: 100%;
      min-height: 100vh;
      border-radius: 0;
      border: none;
    }
    /* mobil: Box übernimmt das (quadratische) Bildformat – nichts wird abgeschnitten */
    .hero {
      flex: none;
      width: 100%;
      aspect-ratio: 1 / 1;
      border-radius: 0;
      min-height: 0;
    }
    .hero img { object-position: center top; }
    .hero::after {
      background: linear-gradient(to top, var(--bg-panel) 4%, rgba(8,12,22,0) 25%);
    }
    .side { padding: 20px 24px 36px; }
    h1 { font-size: 32px; }
    .tagline { margin-bottom: 30px; }
  }

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
  }

  /* CSP-Umbau (23.08.2026): aus style-Attributen ausgelagert. Der Typ-Selektor
     steht beim Eingabefeld mit, weil die Feld-Baseline oben an
     input[type="email"] haengt und eine reine Klasse ihr sonst unterliegt. */
  input.idx-forgot-feld {
    background: var(--bg);
    border-radius: 8px;
    font-size: 14px;
    padding: 9px 12px;
  }
  .idx-forgot-btn {
    background: var(--accent);
    color: #fff;
    font: inherit;
    padding: 8px 14px;
  }
  .idx-forgot-status { margin-top: 10px; color: #34D399; }
