/*
 * Eule Login — Premium Redesign v2
 * Split-Card Layout: Links Formular | Rechts atmosphärische Szene
 * Lädt nach app.css — überschreibt Login-Defaults aus layout.css
 * ================================================================ */

/* ----------------------------------------------------------------
 * 1. PAGE & BACKGROUND
 * ---------------------------------------------------------------- */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 100% 80% at 8% 110%, rgba(24, 69, 200, 0.22) 0%, transparent 48%),
        radial-gradient(ellipse 70% 50% at 92% -5%,  rgba(245, 166, 35, 0.1)  0%, transparent 42%),
        linear-gradient(168deg, #030916 0%, #080f24 38%, #0b1535 70%, #060d1c 100%);
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    box-sizing: border-box;
}

/* Star layer */
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.3px 1.3px at  8% 12%, rgba(255,255,255,0.70) 0%, transparent 100%),
        radial-gradient(0.8px 0.8px at 22%  5%, rgba(255,255,255,0.50) 0%, transparent 100%),
        radial-gradient(1.6px 1.6px at 38% 15%, rgba(255,255,255,0.80) 0%, transparent 100%),
        radial-gradient(0.9px 0.9px at 52%  7%, rgba(255,255,255,0.55) 0%, transparent 100%),
        radial-gradient(1.1px 1.1px at 67% 18%, rgba(255,255,255,0.60) 0%, transparent 100%),
        radial-gradient(0.8px 0.8px at 83% 10%, rgba(255,255,255,0.45) 0%, transparent 100%),
        radial-gradient(1.4px 1.4px at 94% 22%, rgba(255,255,255,0.65) 0%, transparent 100%),
        radial-gradient(0.9px 0.9px at  4% 35%, rgba(255,255,255,0.50) 0%, transparent 100%),
        radial-gradient(1.2px 1.2px at 18% 48%, rgba(255,255,255,0.60) 0%, transparent 100%),
        radial-gradient(0.7px 0.7px at 30% 62%, rgba(255,255,255,0.35) 0%, transparent 100%),
        radial-gradient(1.0px 1.0px at 75% 40%, rgba(255,255,255,0.45) 0%, transparent 100%),
        radial-gradient(0.8px 0.8px at 88% 55%, rgba(255,255,255,0.40) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 12% 78%, rgba(255,255,255,0.55) 0%, transparent 100%),
        radial-gradient(0.9px 0.9px at 46% 82%, rgba(255,255,255,0.35) 0%, transparent 100%),
        radial-gradient(1.1px 1.1px at 60% 70%, rgba(255,255,255,0.45) 0%, transparent 100%),
        radial-gradient(0.8px 0.8px at 95% 75%, rgba(255,255,255,0.35) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Ambient glow */
.login-bg-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 45% at 78% 58%, rgba(245, 166, 35, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 65% 55% at 22% 52%, rgba(24, 69, 200, 0.12) 0%, transparent 55%);
}

/* Particle layer */
.login-page .particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.login-page .particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    animation: eule-particle-rise var(--dur, 8s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes eule-particle-rise {
    0%   { opacity: 0;   transform: translateY(0)     scale(0.8); }
    25%  { opacity: 0.9; }
    75%  { opacity: 0.4; }
    100% { opacity: 0;   transform: translateY(-70px) scale(1.3); }
}

/* ----------------------------------------------------------------
 * 2. MAIN CONTAINER
 * ---------------------------------------------------------------- */

.login-container {
    width: 100%;
    max-width: 980px;
    padding: 0;
    z-index: 2;
    position: relative;
}

/* ----------------------------------------------------------------
 * 3. SPLIT CARD
 * ---------------------------------------------------------------- */

.login-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.65),
        0  0   0 1px rgba(255, 255, 255, 0.07),
        0  0  80px rgba(24, 69, 200, 0.12) inset;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ----------------------------------------------------------------
 * 4. FORM PANEL (left)
 * ---------------------------------------------------------------- */

.login-card__form {
    padding: 3.5rem 3rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(9, 14, 32, 0.82);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

/* Brand */
.login-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2.25rem;
}


.login-brand__name {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.04em;
    line-height: 1;
}

.login-brand__gem {
    color: var(--accent);
    margin-right: 0.1em;
}

/* Headlines */
.login-headline {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.04em;
    line-height: 1.18;
    margin-bottom: 0.45rem;
}

.login-headline__accent {
    color: var(--accent);
}

.login-tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2.25rem;
}

/* ----------------------------------------------------------------
 * 5. ALERT MESSAGES
 * ---------------------------------------------------------------- */

.login-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.84rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
}

.login-alert--error {
    background: rgba(229, 72, 58, 0.1);
    border: 1px solid rgba(229, 72, 58, 0.28);
    color: #fca5a5;
}

.login-alert--success {
    background: rgba(26, 158, 110, 0.1);
    border: 1px solid rgba(26, 158, 110, 0.28);
    color: #6ee7b7;
}

.login-alert--warning {
    background: rgba(245, 166, 35, 0.08);
    border: 1px solid rgba(245, 166, 35, 0.22);
    color: #fde68a;
}

/* ----------------------------------------------------------------
 * 6. FORM FIELDS
 * ---------------------------------------------------------------- */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.login-field__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

.login-field__wrap {
    position: relative;
}

.login-field__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: rgba(245, 166, 35, 0.65);
    pointer-events: none;
    transition: color 0.22s ease;
    flex-shrink: 0;
}

.login-field__input {
    width: 100%;
    padding: 0.92rem 1rem 0.92rem 2.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Lexend', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.login-field__input::placeholder {
    color: rgba(255, 255, 255, 0.18);
}

.login-field__input:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
}

.login-field__input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 166, 35, 0.52);
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.09);
}

.login-field__wrap:focus-within .login-field__icon {
    color: rgba(245, 166, 35, 0.65);
}

/* Password toggle */
.login-field__input--password {
    padding-right: 2.85rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.08em;
}

.login-field__input--password::placeholder {
    font-family: 'Lexend', system-ui, sans-serif;
    letter-spacing: 0;
}

.login-field__pw-toggle {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 4px;
    line-height: 0;
}

.login-field__pw-toggle:hover {
    color: rgba(255, 255, 255, 0.65);
}

.login-field__pw-toggle svg {
    width: 17px;
    height: 17px;
}

/* ----------------------------------------------------------------
 * 7. META ROW (remember + forgot)
 * ---------------------------------------------------------------- */

.login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.1rem;
}

.login-meta__remember {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.42);
    user-select: none;
}

.login-meta__remember input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
    cursor: pointer;
}

.login-meta__forgot {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-meta__forgot:hover {
    color: var(--accent);
}

/* ----------------------------------------------------------------
 * 8. CAPTCHA
 * ---------------------------------------------------------------- */

.login-captcha {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.login-captcha__question {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.login-captcha__hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.8rem;
}

.login-captcha__input {
    width: 7rem;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(245, 166, 35, 0.32);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Lexend', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color 0.22s, box-shadow 0.22s;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.login-captcha__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}

/* ----------------------------------------------------------------
 * 9. SUBMIT BUTTON
 * ---------------------------------------------------------------- */

.login-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f5a623 0%, #e8920c 100%);
    color: #1a0f00;
    font-family: 'Lexend', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    box-shadow: 0 4px 24px rgba(245, 166, 35, 0.28), 0 0 0 1px rgba(255, 200, 80, 0.18) inset;
    margin-top: 0.6rem;
    letter-spacing: -0.01em;
    -webkit-appearance: none;
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #fbb534 0%, #f5a020 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(245, 166, 35, 0.42), 0 0 0 1px rgba(255, 200, 80, 0.28) inset;
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 14px rgba(245, 166, 35, 0.3);
}

.login-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.login-btn__arrow {
    width: 17px;
    height: 17px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.login-btn:hover:not(:disabled) .login-btn__arrow {
    transform: translateX(3px);
}

/* ----------------------------------------------------------------
 * 10. TRUST BADGES
 * ---------------------------------------------------------------- */

.login-trust {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 1.75rem;
    margin-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.login-trust__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    flex: 1;
}

.login-trust__icon {
    width: 20px;
    height: 20px;
    color: rgba(245, 166, 35, 0.55);
}

.login-trust__label {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.login-trust__desc {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.28);
    line-height: 1.3;
}

/* ----------------------------------------------------------------
 * 11. BLOCKED STATE
 * ---------------------------------------------------------------- */

.login-blocked-state {
    text-align: center;
    padding: 0.5rem 0 1rem;
}

.login-blocked-state__icon {
    font-size: 2.25rem;
    display: block;
    margin-bottom: 0.9rem;
    line-height: 1;
}

.login-blocked-state__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.login-blocked-state__text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.login-blocked-state__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1.3rem;
    border-radius: 999px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.login-blocked-state__link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(245, 166, 35, 0.07);
}

/* ----------------------------------------------------------------
 * 12. VISUAL PANEL (right)
 * ---------------------------------------------------------------- */

.login-card__visual {
    position: relative;
    overflow: hidden;
    background: linear-gradient(168deg, #040d22 0%, #0c1a3e 45%, #0f2250 80%, #0a1735 100%);
    min-height: 560px;
}

/* Atmosphärische Farbüberblendung + Vignette über dem Bild */
.login-card__visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(4,  13, 34,  0.18) 0%, transparent 55%),
        radial-gradient(ellipse 100% 35% at 50% 100%, rgba(4,  13, 34,  0.72) 0%, transparent 100%),
        radial-gradient(ellipse 50%  50% at 0%  50%,  rgba(4,  13, 34,  0.45) 0%, transparent 60%);
    z-index: 2;
    pointer-events: none;
}

/* Bild füllt die gesamte rechte Hälfte */
.login-visual-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    display: block;
}

/* ----------------------------------------------------------------
 * 13. FOOTER CAPTION
 * ---------------------------------------------------------------- */

.login-footer-caption {
    position: fixed;
    bottom: 1.1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.18);
    z-index: 2;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------
 * 14. RESPONSIVE
 * ---------------------------------------------------------------- */

@media (max-width: 860px) {
    /* Auf Tablets ist die Karte oft hoeher als der Viewport — Inhalt darf scrollen,
       und die Karte wird oben verankert (statt zentriert), damit unten nichts abgeschnitten wird. */
    .login-page {
        align-items: flex-start;
        padding: 1.5rem 1.25rem 4rem; /* unten Platz fuer .login-footer-caption */
    }

    .login-card {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .login-card__visual {
        display: none;
    }

    .login-card__form {
        padding: 2.75rem 2.25rem 2.5rem;
    }

    .login-container {
        max-width: 520px;
        padding: 0;
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .login-card__form {
        padding: 2.25rem 1.5rem 2rem;
    }

    .login-headline {
        font-size: 1.7rem;
    }

    .login-trust {
        flex-wrap: wrap;
        gap: 1rem 0.5rem;
    }

    .login-page .particles {
        display: none;
    }
}
