/* meineinfowelt | Login & Register */

:root {
    --auth-ink: #19243c;
    --auth-muted: #738098;
    --auth-primary: #4356e8;
    --auth-line: #e4e9f3;
}

* {
    box-sizing: border-box;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background: #f2f5fb;
    color: var(--auth-ink);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Layout */

.auth-viewport {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(18px, 4vw, 48px);
}

.auth-shell {
    width: 100%;
    max-width: 1120px;
    min-height: 650px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border: 1px solid rgba(220, 227, 242, .75);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 75px rgba(30, 49, 97, .12);
}

/* Branding */

.auth-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 38px 46px;
    color: #fff;
    background: linear-gradient(
        148deg,
        #1d2d79 2%,
        #334bd0 52%,
        #635de6 100%
    );
}

/* Das Logo wird ausschließlich als Bild aus public/logo.png angezeigt. */
.auth-brand .brand-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    max-width: 100%;
    text-decoration: none;
}

.auth-brand-logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-mobile-brand a {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    text-decoration: none;
}

.auth-mobile-logo {
    display: block;
    width: 190px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 26px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 30px;
    background: rgba(255, 255, 255, .09);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .025em;
}

.auth-pill-dot {
    width: 7px;
    height: 7px;
    background: #9befd3;
    border-radius: 50%;
}

.auth-brand h1 {
    margin-bottom: 20px;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.16;
    letter-spacing: -1.6px;
    font-weight: 800;
}

.auth-brand h1 span {
    color: #cbd3ff;
}

.auth-brand-content > p {
    max-width: 360px;
    margin: 0 0 29px;
    color: #e0e6ff;
    font-size: 15px;
    line-height: 1.75;
}

.auth-features {
    display: grid;
    gap: 18px;
}

.auth-features > div {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f6f7ff;
    font-size: 14px;
}

.auth-features > div > span {
    display: grid;
    place-items: center;
    flex: none;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
}

.auth-brand-bottom {
    position: relative;
    z-index: 1;
    color: #d4daff;
    font-size: 12px;
}

.auth-decoration {
    position: absolute;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 50%;
    pointer-events: none;
}

.auth-decoration-one {
    width: 430px;
    height: 430px;
    right: -250px;
    top: 25px;
}

.auth-decoration-two {
    width: 350px;
    height: 350px;
    left: -270px;
    bottom: -190px;
}

/* Form */

.auth-form-side {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px clamp(25px, 5vw, 65px);
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
    margin: auto 0;
}

.auth-mobile-brand {
    display: none;
}

.form-eyebrow {
    margin-bottom: 12px;
    color: var(--auth-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.auth-form-inner h2 {
    margin-bottom: 9px;
    font-size: clamp(25px, 2.3vw, 32px);
    font-weight: 800;
    letter-spacing: -.9px;
    line-height: 1.2;
}

.auth-intro {
    margin-bottom: 29px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-form-inner .form-label {
    margin-bottom: 9px;
    color: #34415b;
    font-size: 13px;
    font-weight: 700;
}

/* Inputs */

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    transform: translateY(-50%);
    color: #98a5bd;
    font-size: 14px;
    pointer-events: none;
}

.auth-input-wrap > .form-control {
    min-height: 49px;
    padding: 12px 15px 12px 44px;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    background: #f9fbff;
    box-shadow: none;
    font-size: 14px;
}

.auth-input-wrap > .form-control:focus {
    border-color: #8793f4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 86, 232, .12);
}

.auth-input-wrap > .form-control::placeholder {
    color: #a6b0c3;
}

.auth-input-wrap > .form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.auth-input-wrap > .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .12);
}

/* Password toggle */

.auth-input-wrap > .form-control.has-password-toggle {
    padding-right: 54px;
}

.auth-input-wrap .password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    z-index: 3;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #6b7893;
    cursor: pointer;
}

.auth-input-wrap .password-toggle:hover {
    background: #edf1ff;
    color: #354bd3;
}

.auth-input-wrap .password-toggle:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 1px;
}

/* Privacy checkbox */

.auth-form-inner .form-check {
    padding-left: 29px;
}

.auth-form-inner .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    margin-left: -29px;
    border: 2px solid #9099a8;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: none;
    cursor: pointer;
}

.auth-form-inner .form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-form-inner .form-check-input:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 3px;
}

.auth-form-inner .form-check-label {
    color: #34415b;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
}

.auth-form-inner .form-check-label a {
    color: var(--auth-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Primary button */

.auth-submit.btn {
    padding: 13px 16px;
    border: 1px solid var(--auth-primary);
    border-radius: 11px;
    background: var(--auth-primary);
    box-shadow: 0 9px 20px rgba(67, 86, 232, .16);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.auth-submit.btn:hover,
.auth-submit.btn:focus {
    background: #3143d1;
    border-color: #3143d1;
    color: #fff;
}

/* Passkey */

.passkey-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 23px 0 17px;
    color: #77839a;
    font-size: 13px;
}

.passkey-divider::before,
.passkey-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dce2ed;
}

.auth-form-inner #passkey-login.passkey-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 9px 12px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    color: #4058bd;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.auth-form-inner #passkey-login i {
    flex-shrink: 0;
    margin: 0;
    font-size: 15px;
    line-height: 1;
}

.auth-form-inner #passkey-login span {
    font-size: 14px;
    line-height: 1.4;
}

.auth-form-inner #passkey-login:hover {
    background: #edf3ff;
    color: #233ca5;
}

.auth-form-inner #passkey-login:focus-visible {
    outline: 2px solid #4058bd;
    outline-offset: 2px;
}

.auth-form-inner #passkey-login:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* Registration password explanation */
.register-password-hint {
    display: block;
    margin-top: 7px;
    color: #8290aa;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

/* Validation errors */

.auth-field-error {
    display: none;
    margin-top: 7px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.auth-field-error.is-visible {
    display: block;
}

.auth-form-inner .form-control[aria-invalid="true"],
.auth-form-inner .form-control.is-invalid {
    border-color: #dc2626;
    background-image: none;
}

.auth-form-inner .form-control[aria-invalid="true"]:focus,
.auth-form-inner .form-control.is-invalid:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.auth-form-inner .form-check-input.is-invalid {
    border-color: #dc2626;
}

/* Footer & alerts */

.auth-switch {
    margin: 28px 0 0;
    color: var(--auth-muted);
    font-size: 13px;
    text-align: center;
}

.auth-switch a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 750;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-form-footer {
    margin-top: 25px;
    color: #a5adc0;
    font-size: 11px;
}

.auth-form-inner .alert {
    border-radius: 11px;
    font-size: 13px;
}

.auth-form-inner .alert ul {
    padding-left: 18px;
}

/* Responsive */

@media (max-width: 820px) {
    .auth-shell {
        max-width: 520px;
        min-height: initial;
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-side {
        padding: 34px 30px 24px;
    }

    .auth-form-inner {
        max-width: 420px;
    }

    .auth-mobile-brand {
        display: flex;
        align-items: center;
        align-self: flex-start;
        gap: 10px;
        margin-bottom: 35px;
        color: #3447cf;
        font-weight: 800;
    }

    .auth-mobile-logo {
        width: 170px;
    }
}

@media (max-width: 480px) {
    body.auth-page {
        background: #fff;
    }

    .auth-viewport {
        align-items: flex-start;
        padding: 0;
    }

    .auth-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-form-side {
        padding: 27px 22px 20px;
    }

    .auth-mobile-brand {
        margin-bottom: 40px;
    }

    .auth-intro {
        margin-bottom: 24px;
    }

    .auth-form-footer {
        margin-top: 35px;
    }
}
