/* ── Reset & Custom Properties ── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html, body {
      min-height: 100vh;
    }

    body {
      font-family: 'Source Sans 3', sans-serif;
      background-color: var(--body-bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* ── Page Layout ── */
    .page-wrapper {
      flex: 1;
      display: grid;
      grid-template-columns: 1fr 1fr;
      min-height: calc(100vh - 56px);
    }

    /* ── Left Panel ── */
    .panel-hero {
      background-color: var(--primary);
      color: #fff;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      padding: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4.5rem);
      position: relative;
      overflow: hidden;
    }

    .panel-hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 110% 110%, rgba(255,255,255,.06) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at -10% -10%, rgba(255,255,255,.04) 0%, transparent 60%);
      pointer-events: none;
    }

    /* Großes Hintergrund-Wappen */
    .hero-bg-wappen {
      position: absolute;
      right: -60px;
      bottom: -40px;
      width: 340px;
      opacity: .06;
      pointer-events: none;
      transform: rotate(-8deg);
    }

    .hero-bg-wappen svg { width: 100%; height: auto; }

    /* Logo & Headings */
    .hero-logo {
      position: relative;
      z-index: 2;
      display: flex;
      align-items: center;
      gap: 1rem;
      margin-bottom: clamp(2rem, 5vw, 3.5rem);
    }

    .hero-logo svg {
      width: 48px;
      height: 60px;
      filter: drop-shadow(0 2px 8px rgba(0,0,0,.15));
    }

    .hero-logo-text { display: flex; flex-direction: column; }
    .portal-name { font-size: 1.15rem; font-weight: 600; letter-spacing: .03em; }
    .portal-sub { font-size: .85rem; opacity: .8; }

    .hero-heading {
      position: relative;
      z-index: 2;
      font-family: 'Lora', serif;
      font-size: clamp(2rem, 4vw, 2.75rem);
      font-weight: 500;
      line-height: 1.15;
      margin-bottom: 1.25rem;
    }

    .hero-heading em {
      color: var(--accent);
      font-style: italic;
      font-weight: 600;
    }

    .hero-sub {
      position: relative;
      z-index: 2;
      font-size: 1.1rem;
      line-height: 1.6;
      opacity: .9;
      max-width: 420px;
      margin-bottom: 3rem;
    }

    /* Features List */
    .hero-features {
      position: relative;
      z-index: 2;
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .hero-feature {
      display: flex;
      align-items: center;
      gap: .75rem;
      font-size: .95rem;
      opacity: .9;
    }

    .hero-feature-dot {
      width: 6px;
      height: 6px;
      background: var(--accent);
      border-radius: 50%;
    }

    /* ── Right Panel ── */
    .panel-login {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: clamp(2.5rem, 5vw, 4rem);
      background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
      background-size: 20px 20px;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .login-card {
      width: 100%;
      max-width: 420px;
      background: #fff;
      padding: 2.5rem;
      border-radius: 12px;
      box-shadow: var(--shadow);
      animation: fadeIn 0.4s ease-out;
    }

    .login-header { text-align: center; margin-bottom: 2rem; }

    .login-header .eyebrow {
      font-size: .8rem;
      font-weight: 600;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-bottom: .5rem;
    }

    .login-header h1 {
      font-family: 'Lora', serif;
      font-size: 2rem;
      font-weight: 600;
      color: var(--text);
      line-height: 1.2;
      margin-bottom: .5rem;
    }

    .login-header p { font-size: .95rem; color: var(--muted); }

    /* ── Formular ── */
    .login-form { display: flex; flex-direction: column; gap: 1.25rem; }

    .field-group { display: flex; flex-direction: column; gap: .4rem; }

    .field-group label {
      font-size: .88rem;
      font-weight: 600;
      color: var(--text);
    }

    .input-wrap { position: relative; }

    .input-wrap input {
      width: 100%;
      padding: .85rem 1rem .85rem 2.5rem;
      font-family: inherit;
      font-size: .95rem;
      color: var(--text);
      background: var(--body-bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      transition: all var(--trans);
    }

    .input-wrap input:focus {
      outline: none;
      background: #fff;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
      transform: translateY(-1px);
    }

    /* Accessibility: Focus visible styles */
    a:focus-visible, button:focus-visible, input:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .input-wrap input::placeholder { color: #aaa; }

    .input-wrap > svg:not(button svg) {
      position: absolute;
      left: .85rem;
      top: 50%;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
      color: #999;
      pointer-events: none;
      transition: color var(--trans);
    }
    /* ── Show Password Toggle ── */
    .input-wrap .left-icon {
      position: absolute;
      left: .85rem;
      top: 50%;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
      color: #999;
      pointer-events: none;
      transition: color var(--trans);
    }

    .password-toggle-btn {
      position: absolute;
      right: .85rem;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      color: #999;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: color var(--trans);
    }

    .password-toggle-btn:hover {
      color: var(--primary);
    }

    .input-wrap:has(.password-toggle-btn) input {
      padding-right: 2.5rem;
    }

    .input-wrap input:focus + svg,
    .input-wrap:has(input:focus) svg {
      color: var(--primary);
    }

    /* Workaround für :has-Unterstützung */
    .input-wrap input:focus ~ svg { color: var(--primary); }

    .field-extra {
      display: flex;
      justify-content: flex-end;
      margin-top: .2rem;
    }

    .field-extra a {
      font-size: .82rem;
      color: var(--primary);
      text-decoration: none;
      transition: color var(--trans);
    }

    .field-extra a:hover { color: var(--dark); text-decoration: underline; }

    /* ── Meldungen ── */
    .alert {
      display: flex;
      align-items: flex-start;
      gap: .65rem;
      padding: .75rem 1rem;
      border-radius: var(--radius);
      font-size: .88rem;
      line-height: 1.45;
    }

    .alert-error {
      background: #fff1f1;
      border: 1px solid #f8b4b4;
      color: #8b1a1a;
    }

    .alert-success {
      background: #f0fdf4;
      border: 1px solid #86efac;
      color: #14532d;
    }

    .alert svg { flex-shrink: 0; margin-top: .1rem; }

    /* ── Button ── */
    .btn-primary {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .5rem;
      width: 100%;
      padding: .8rem 1.5rem;
      background: var(--primary);
      color: #fff;
      font-family: 'Source Sans 3', sans-serif;
      font-size: 1rem;
      font-weight: 600;
      letter-spacing: .02em;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
      margin-top: .3rem;
    }

    .btn-primary:hover {
      background: var(--dark);
      box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 35%, transparent);
      transform: translateY(-1px);
    }

    .btn-primary:active { transform: translateY(0); }

    .btn-primary svg { transition: transform var(--trans); }
    .btn-primary:hover svg { transform: translateX(3px); }

    /* ── Divider ── */
    .divider {
      display: flex;
      align-items: center;
      gap: .75rem;
      margin: .5rem 0;
    }

    .divider::before,
    .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    .divider span {
      font-size: .78rem;
      color: var(--muted);
      white-space: nowrap;
    }

    /* ── Weitere Links ── */
    .login-links {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: .55rem;
      margin-top: .5rem;
    }

    .login-links a {
      font-size: .88rem;
      color: var(--muted);
      text-decoration: none;
      transition: color var(--trans);
    }

    .login-links a:hover { color: var(--primary); }
    .login-links a strong { font-weight: 600; color: var(--primary); }

    /* ── Info-Banner ── */
    .info-banner {
      margin-top: 1.75rem;
      padding: .85rem 1rem;
      background: var(--light);
      border-left: 3px solid var(--accent);
      border-radius: 0 var(--radius) var(--radius) 0;
      font-size: .83rem;
      color: var(--muted);
      line-height: 1.5;
    }

    .info-banner strong { color: var(--text); }

    /* ── Footer ── */
    footer {
      background: var(--dark);
      color: rgba(255,255,255,.6);
      font-size: .78rem;
      padding: 1rem 2rem;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: .5rem;
    }

    footer a {
      color: rgba(255,255,255,.7);
      text-decoration: none;
      transition: color var(--trans);
    }

    footer a:hover { color: #fff; }

    footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }

    /* ── Responsive ── */
    @media (max-width: 820px) {
      .page-wrapper {
        grid-template-columns: 1fr;
      }

      .panel-hero {
        padding: 2.5rem 1.75rem;
        min-height: auto;
      }

      .hero-heading { font-size: 1.75rem; }

      .hero-features { display: none; }

      .panel-login {
        padding: 2.5rem 1.5rem;
      }
    }

    @media (max-width: 480px) {
      .panel-hero { padding: 2rem 1.25rem; }
      .panel-login { padding: 2rem 1.25rem; }
      footer { flex-direction: column; text-align: center; }
    }