/* ==========================================================================
   FlexiPortal Login
   Heller, kundenfreundlicher Portal-Look
   ========================================================================== */

:root {
    --auth-bg: #f3f7fb;
    --auth-surface: #ffffff;
    --auth-surface-soft: #f7f9fc;

    --auth-text: #152033;
    --auth-text-soft: #5e6b7d;
    --auth-text-muted: #8a96a8;

    --auth-primary: #2563eb;
    --auth-primary-dark: #1d4ed8;
    --auth-primary-soft: #eaf2ff;

    --auth-accent: #14b8a6;
    --auth-accent-soft: #e8faf7;

    --auth-border: #dce4ee;
    --auth-border-hover: #b9c8da;

    --auth-danger: #d92d4c;
    --auth-danger-bg: #fff1f3;
    --auth-danger-border: #fecdd6;

    --auth-radius-xl: 28px;
    --auth-radius-lg: 18px;
    --auth-radius-md: 13px;

    --auth-shadow:
        0 30px 80px rgba(51, 65, 85, 0.14),
        0 8px 24px rgba(51, 65, 85, 0.08);
}


/* ==========================================================================
   Grundlayout
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--auth-bg);
}

body.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--auth-text);
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(37, 99, 235, 0.08),
            transparent 34%
        ),
        radial-gradient(
            circle at 90% 85%,
            rgba(20, 184, 166, 0.08),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #f7faff 0%,
            #eef4fa 50%,
            #f8fbfd 100%
        );
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.auth-page-wrap {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.auth-shell {
    width: min(1160px, 100%);
    min-height: 690px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: var(--auth-radius-xl);
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
}


/* ==========================================================================
   Linke Bildseite
   ========================================================================== */

.auth-visual {
    position: relative;
    isolation: isolate;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    padding: 32px 36px 36px;
    color: #ffffff;
    background:
        linear-gradient(
            180deg,
            rgba(25, 55, 95, 0.05) 0%,
            rgba(25, 55, 95, 0.18) 42%,
            rgba(18, 47, 83, 0.74) 100%
        ),
        url("/assets/img/login-bg.png") center / cover no-repeat;
}

.auth-visual::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(
            120deg,
            rgba(37, 99, 235, 0.2),
            rgba(20, 184, 166, 0.08) 48%,
            transparent 80%
        );
}

.auth-visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -120px;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    box-shadow:
        0 0 0 38px rgba(255, 255, 255, 0.04),
        0 0 0 76px rgba(255, 255, 255, 0.025);
}

.auth-visual-top {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;

}

.auth-brand-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 10px 24px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 19px;
}

.auth-brand-copy {
    min-width: 0;
}

.auth-brand-name {
    display: block;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 750;
}

.auth-brand-subtitle {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
    line-height: 1.2;
}

.auth-visual-content {
    position: relative;
    z-index: 2;
    max-width: 540px;
    margin-top: 48px;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 650;
}

.auth-hello,
.auth-welcome {
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 5vw, 66px);
    line-height: 1;
    font-weight: 780;
    letter-spacing: -0.045em;
    text-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.auth-welcome {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.9);
}

.auth-visual-text {
    max-width: 470px;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.65;
    text-shadow: 0 4px 15px rgba(15, 23, 42, 0.2);
}

.auth-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.auth-benefit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 11px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 550;
}

.auth-visual-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: auto;
    padding-top: 30px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
}

.auth-visual-foot-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}


/* ==========================================================================
   Sprachumschalter
   ========================================================================== */

.auth-lang-switcher,
.auth-lang-switcher .dropdown {
    position: relative;
    z-index: 1055;
}

.auth-lang-switcher .dropdown-toggle,
.portal-lang-switcher .dropdown-toggle {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 11px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 650;
    box-shadow: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-lang-switcher .dropdown-toggle:hover,
.auth-lang-switcher .dropdown-toggle:focus,
.portal-lang-switcher .dropdown-toggle:hover,
.portal-lang-switcher .dropdown-toggle:focus {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.auth-lang-switcher .dropdown-menu,
.portal-lang-switcher .dropdown-menu {
    min-width: 180px;
    padding: 7px;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(51, 65, 85, 0.16);
}

.auth-lang-switcher .dropdown-item,
.portal-lang-switcher .dropdown-item {
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--auth-text-soft);
    font-size: 13px;
}


.auth-lang-switcher .dropdown-item:hover,
.auth-lang-switcher .dropdown-item:focus,
.auth-lang-switcher .dropdown-item.active,
.portal-lang-switcher .dropdown-item:hover,
.portal-lang-switcher .dropdown-item:focus,
.portal-lang-switcher .dropdown-item.active {
    color: var(--auth-primary-dark);
    background: var(--auth-primary-soft);
}


/* ==========================================================================
   Rechte Formularseite
   ========================================================================== */

.auth-form {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(37, 99, 235, 0.045),
            transparent 32%
        ),
        #ffffff;
}

.auth-form-inner {
    width: min(100%, 430px);
}

.auth-mobile-top {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
}

.auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-text);
    font-size: 15px;
    font-weight: 750;
}

.auth-mobile-brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
}

.auth-head {
    margin-bottom: 27px;
}

.auth-title-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.auth-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid #d6e5ff;
    border-radius: 15px;
    color: var(--auth-primary);
    background:
        linear-gradient(
            145deg,
            #f2f7ff,
            #e8f2ff
        );
    font-size: 19px;
}

.auth-kicker {
    margin-bottom: 6px;
    color: var(--auth-primary);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(31px, 3vw, 40px);
    line-height: 1.08;
    font-weight: 780;
    letter-spacing: -0.04em;
}

.auth-sub {
    max-width: 390px;
    margin-top: 15px;
    color: var(--auth-text-soft);
    font-size: 14px;
    line-height: 1.65;
}

.auth-secure {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    color: var(--auth-text-muted);
    font-size: 11px;
}

.auth-secure i {
    color: var(--auth-accent);
}


/* ==========================================================================
   Fehlermeldung
   ========================================================================== */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 20px;
    padding: 13px 14px;
    border: 1px solid var(--auth-danger-border);
    border-radius: 13px;
    color: var(--auth-danger);
    background: var(--auth-danger-bg);
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert i {
    margin-top: 1px;
}


/* ==========================================================================
   Formularfelder
   ========================================================================== */

.auth-card {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

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

.auth-field {
    min-width: 0;
}

.auth-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: #344054;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
}

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

.auth-input-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #98a4b4;
    font-size: 15px;
    pointer-events: none;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.auth-input {
    width: 100%;
    min-height: 52px;
    padding: 13px 15px 13px 44px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    color: var(--auth-text);
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(16, 24, 40, 0.03),
        inset 0 1px 1px rgba(16, 24, 40, 0.015);
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.auth-input::placeholder {
    color: #a5afbd;
    opacity: 1;
}

.auth-input:hover {
    border-color: var(--auth-border-hover);
}

.auth-input:focus {
    color: var(--auth-text);
    border-color: rgba(37, 99, 235, 0.58);
    outline: 0;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.1),
        0 6px 16px rgba(37, 99, 235, 0.06);
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--auth-primary);
    transform: translateY(-50%) scale(1.04);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-text);
    caret-color: var(--auth-text);
    border-color: rgba(37, 99, 235, 0.52);
    -webkit-box-shadow:
        0 0 0 1000px #ffffff inset,
        0 0 0 4px rgba(37, 99, 235, 0.08);
}

.auth-input-password {
    padding-right: 52px;
}

.pw-wrap {
    position: relative;
}

.pw-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 9px;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: #8491a3;
    background: transparent;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.pw-toggle:hover {
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
}

.pw-toggle:focus-visible {
    color: var(--auth-primary);
    outline: 0;
    background: var(--auth-primary-soft);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--auth-text-soft);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.auth-check .form-check-input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin: 0;
    border: 1px solid #b8c3d1;
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: none;
    cursor: pointer;
}

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

.auth-check .form-check-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-link {
    color: var(--auth-primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}


/* ==========================================================================
   Login-Button
   ========================================================================== */

.auth-btn {
    min-height: 52px;
    margin-top: 2px;
    padding: 13px 18px;
    border: 1px solid var(--auth-primary);
    border-radius: var(--auth-radius-md);
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--auth-primary),
            #3b82f6
        );
    box-shadow:
        0 10px 24px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    font-size: 14px;
    font-weight: 750;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.auth-btn:hover {
    color: #ffffff;
    border-color: var(--auth-primary-dark);
    background:
        linear-gradient(
            135deg,
            var(--auth-primary-dark),
            var(--auth-primary)
        );
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(37, 99, 235, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

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

.auth-btn:focus-visible {
    color: #ffffff;
    outline: 0;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.13),
        0 12px 26px rgba(37, 99, 235, 0.2);
}

.auth-btn-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.auth-help {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--auth-text-muted);
    font-size: 11px;
    line-height: 1.55;
}

.auth-help i {
    margin-top: 2px;
    color: var(--auth-accent);
}


/* ==========================================================================
   Footer
   ========================================================================== */

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 29px;
    padding-top: 19px;
    border-top: 1px solid #e8edf3;
    color: var(--auth-text-muted);
    font-size: 11px;
}

.auth-footer-support {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.auth-footer-support i {
    color: var(--auth-primary);
}

.auth-footer-support a {
    overflow: hidden;
    color: var(--auth-text-soft);
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-footer-support a:hover {
    color: var(--auth-primary);
}

.auth-footer-copy {
    flex: 0 0 auto;
    white-space: nowrap;
}


/* ==========================================================================
   Mobile Sprachumschalter
   ========================================================================== */

.auth-mobile-top .portal-lang-switcher .dropdown-toggle {
    border-color: var(--auth-border);
    color: var(--auth-text-soft);
    background: #ffffff;
}

.auth-mobile-top .portal-lang-switcher .dropdown-toggle:hover,
.auth-mobile-top .portal-lang-switcher .dropdown-toggle:focus {
    color: var(--auth-primary);
    border-color: rgba(37, 99, 235, 0.35);
    background: var(--auth-primary-soft);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1060px) {
    .auth-page-wrap {
        padding: 22px;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
        min-height: 650px;
    }

    .auth-visual {
        padding: 28px 30px 34px;
    }

    .auth-form {
        padding: 40px 34px;
    }

    .auth-hello,
    .auth-welcome {
        font-size: clamp(40px, 5vw, 58px);
    }
}

@media (max-width: 860px) {
    .auth-page-wrap {
        align-items: flex-start;
        padding: 0;
    }

    .auth-shell {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-visual {
        display: none;
    }

    .auth-form {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 28px 24px 36px;
    }

    .auth-form-inner {
        width: min(100%, 500px);
    }

    .auth-mobile-top {
        display: flex;
    }
}

@media (max-width: 575px) {
    .auth-form {
        align-items: flex-start;
        padding: 20px 18px 28px;
    }

    .auth-mobile-top {
        width: 100%;
        margin-bottom: 46px;
    }

    .auth-head {
        margin-bottom: 25px;
    }

    .auth-title-row {
        gap: 13px;
    }

    .auth-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .auth-h1 {
        font-size: 31px;
    }

    .auth-sub {
        font-size: 13px;
    }

    .auth-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .auth-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 380px) {
    .auth-mobile-top {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 36px;
    }
}


/* ==========================================================================
   Reduzierte Animationen
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}