/* =========================================================
   LOGIN – animierter Hintergrund + Glassmorphism-Panel
   ========================================================= */

/* Neutralisiert Layout-Paddings, damit 100vh sauber bleibt */
body:has(.login-bg) main.lp-page {
    padding-top: 0;
    padding-bottom: 0;
}

/* Animierter Farbverlauf */
@keyframes lp-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes lp-blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, 30px) scale(1.12); }
}

@keyframes lp-panel-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lp-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lp-spin {
    to { transform: rotate(360deg); }
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(135deg, #064a96 0%, #0783ff 25%, #3aa0ff 50%, #66b3ff 75%, #fbff3a 100%);
    background-size: 200% 200%;
    animation: lp-gradient-shift 22s ease-in-out infinite;
    overflow: hidden;
}

/* Zwei weiche Blur-Blobs für Tiefe */
.login-bg::before,
.login-bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.38;
    pointer-events: none;
}

.login-bg::before {
    width: 440px; height: 440px;
    background: #fbff3a;
    top: -90px; right: -70px;
    animation: lp-blob-float 18s ease-in-out infinite;
}

.login-bg::after {
    width: 520px; height: 520px;
    background: #0783ff;
    bottom: -140px; left: -90px;
    animation: lp-blob-float 26s ease-in-out infinite reverse;
}

.login-page {
    min-height: 100vh;
    padding: 28px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Halbtransparentes Panel */
.login-panel {
    width: min(520px, 100%);
    border-radius: 22px;
    padding: 28px 26px 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    animation: lp-panel-in 0.7s cubic-bezier(.2, .8, .2, 1);
}

.login-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    background: #fff;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    display: inline-block;
}

.welcome {
    color: #fff;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 20px);
    text-align: center;
    margin: 18px 0 16px;
    line-height: 1.35;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Zitat-Box mit Anführungszeichen-Ornament */
.quote-box {
    position: relative;
    margin: 0 auto 20px;
    width: 100%;
    min-height: 62px;
    border-radius: 12px;
    padding: 14px 18px 14px 48px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(250, 204, 21, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    animation: lp-fade-in 0.9s ease 0.2s both;
}

    /* Anführungszeichen-Dekoration entfernt */

    .quote-box span {
        color: #fff8d6;
        font-style: italic;
        font-weight: 600;
        font-size: 14px;
        letter-spacing: .2px;
        line-height: 1.4;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }

/* Formular-Karte */
.login-card {
    width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: #fff;
}

    .login-card .card-body {
        padding: 26px 24px;
    }

.form-label {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: .2px;
}

/* Input mit Icon links (und optional Toggle rechts) */
.input-wrap {
    position: relative;
}

    .input-wrap .input-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #9ca3af;
        pointer-events: none;
        display: flex;
        align-items: center;
    }

        .input-wrap .input-icon svg {
            display: block;
        }

    .input-wrap .form-control {
        padding-left: 44px;
    }

    .input-wrap.has-toggle .form-control {
        padding-right: 46px;
    }

.pwd-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .15s, color .15s;
}

    .pwd-toggle:hover {
        background: #f3f4f6;
        color: #1f2937;
    }

    .pwd-toggle:focus-visible {
        outline: 2px solid #3aa0ff;
        outline-offset: 1px;
    }

.form-control {
    border-radius: 10px;
    height: 48px;
    border: 2px solid #e5e7eb;
    background: #fafbfc;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

    .form-control:focus {
        border-color: #3aa0ff;
        box-shadow: 0 0 0 4px rgba(96, 165, 250, .18);
        background: #fff;
    }

.help-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

.form-check-input {
    cursor: pointer;
}

    .form-check-input:checked {
        background-color: #0783ff;
        border-color: #0783ff;
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 3px rgba(96, 165, 250, .25);
        border-color: #3aa0ff;
    }

.form-check-label {
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

/* Submit-Button mit Hover-Lift + Loading-Spinner */
.btn-login {
    height: 52px;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: .3px;
    font-size: 15px;
    border: 0;
    background: linear-gradient(135deg, #0783ff 0%, #3aa0ff 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(43, 106, 168, .35);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s;
    position: relative;
    overflow: hidden;
}

    .btn-login:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(43, 106, 168, .42);
        filter: brightness(1.05);
        color: #fff;
    }

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

    .btn-login:focus-visible {
        outline: 3px solid rgba(250, 204, 21, .75);
        outline-offset: 2px;
    }

    .btn-login:disabled {
        opacity: .8;
        cursor: wait;
    }

    .btn-login .spinner {
        display: none;
        width: 18px;
        height: 18px;
        border: 2.5px solid rgba(255, 255, 255, .35);
        border-top-color: #fff;
        border-radius: 50%;
        animation: lp-spin .75s linear infinite;
        margin-right: 8px;
        vertical-align: -4px;
    }

    .btn-login.loading .btn-label {
        opacity: .85;
    }

    .btn-login.loading .spinner {
        display: inline-block;
    }

.login-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Dezenter auf kleinen Geräten */
@media (max-width: 480px) {
    .login-panel {
        padding: 22px 16px 18px;
        border-radius: 18px;
    }

    .login-card .card-body {
        padding: 20px 18px;
    }

    .login-logo {
        max-width: 180px;
        padding: 10px 14px;
    }

    .quote-box {
        padding: 12px 14px 12px 44px;
    }
}

/* Accessibility: Animationen reduzieren */
@media (prefers-reduced-motion: reduce) {
    .login-bg,
    .login-bg::before,
    .login-bg::after,
    .login-panel,
    .quote-box {
        animation: none;
    }
}
