/* Auto-wydzielone z logowanie.php. Logika strony bez zmian. */

body.login-page {
            min-height: 100vh;
            min-height: 100dvh;
            margin: 0;
            padding:
                calc(30px + env(safe-area-inset-top))
                calc(20px + env(safe-area-inset-right))
                calc(30px + env(safe-area-inset-bottom))
                calc(20px + env(safe-area-inset-left));
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background:
                radial-gradient(
                    circle at 18% 12%,
                    rgba(57, 255, 20, 0.09),
                    transparent 34%
                ),
                radial-gradient(
                    circle at 86% 86%,
                    rgba(30, 144, 255, 0.07),
                    transparent 32%
                ),
                #121212 !important;
            background-image:
                radial-gradient(
                    circle at 18% 12%,
                    rgba(57, 255, 20, 0.09),
                    transparent 34%
                ),
                radial-gradient(
                    circle at 86% 86%,
                    rgba(30, 144, 255, 0.07),
                    transparent 32%
                ) !important;
            color: #fff;
        }

        .login-logo {
            margin: 0 auto 24px;
            text-align: center;
        }

        .login-logo a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 11px;
            color: #fff;
            text-decoration: none;
        }

        .login-logo img {
            width: 58px;
            height: 58px;
            display: block;
            object-fit: contain;
        }

        .login-logo h1 {
            margin: 0;
            font-size: 29px;
            line-height: 1;
            color: #fff;
        }

        .login-logo .zielone-litery {
            color: #39ff14;
        }

        .login-layout {
            width: min(100%, 980px);
            display: grid;
            grid-template-columns: minmax(0, 520px) minmax(300px, 1fr);
            gap: 22px;
            align-items: stretch;
        }

        .login-card,
        .login-info {
            box-sizing: border-box;
            border: 1px solid #333;
            border-radius: 12px;
            box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38);
        }

        .login-card {
            width: 100%;
            margin: 0;
            padding: 28px;
            background: #1a1a1a;
        }

        .login-card h2 {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin: 0 0 24px;
            padding: 0 0 16px;
            border-bottom: 1px dashed #444;
            color: #fff;
            font-size: 24px;
            text-align: center;
        }

        .login-card h2 i {
            color: #39ff14;
        }

        .login-card form {
            display: grid;
            gap: 10px;
            margin: 0;
        }

        .login-card label {
            display: block;
            margin: 4px 0 0;
            color: #e0e0e0;
            font-size: 14px;
            font-weight: 700;
            text-align: left;
        }

        .login-card input[type="text"],
        .login-card input[type="password"] {
            width: 100%;
            height: 46px;
            margin: 0;
            padding: 0 13px;
            border: 1px solid #444;
            border-radius: 7px;
            background: #f7f7f7;
            color: #111;
            font: inherit;
            box-sizing: border-box;
        }

        .login-card input:focus {
            border-color: #39ff14;
            outline: 2px solid rgba(57, 255, 20, 0.18);
            outline-offset: 1px;
        }

        .login-card .password-container {
            position: relative;
            width: 100%;
            margin: 0;
        }

        .login-card .password-container input {
            padding-right: 50px;
        }

        .login-card .toggle-password {
            position: absolute;
            top: 50%;
            right: 6px;
            width: 38px;
            height: 38px;
            margin: 0;
            padding: 0;
            display: grid;
            place-items: center;
            transform: translateY(-50%);
            border: 0;
            border-radius: 6px;
            background: transparent;
            color: #777;
            cursor: pointer;
            box-shadow: none;
        }

        .login-card .toggle-password:hover {
            background: #e9e9e9;
            color: #111;
        }

        .login-card form > button[type="submit"] {
            width: 100%;
            min-height: 48px;
            margin: 12px 0 0;
            padding: 12px 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            border: 1px solid #39ff14;
            border-radius: 7px;
            background: #39ff14;
            color: #050505;
            font: inherit;
            font-weight: 900;
            cursor: pointer;
            transition:
                background 0.2s,
                transform 0.2s;
        }

        .login-card form > button[type="submit"]:hover {
            background: #63ff46;
            transform: translateY(-1px);
        }

        .login-card .error,
        .login-card .success {
            width: 100%;
            margin: 0 0 18px;
            padding: 12px 14px;
            display: flex;
            align-items: flex-start;
            gap: 9px;
            border-radius: 7px;
            box-sizing: border-box;
            line-height: 1.45;
        }

        .login-card .error {
            border: 1px solid #ff4d4d;
            background: rgba(255, 77, 77, 0.09);
            color: #ffd3d3;
        }

        .login-card .success {
            border: 1px solid #39ff14;
            background: rgba(57, 255, 20, 0.08);
            color: #d9ffd2;
        }

        .login-links {
            display: grid;
            gap: 8px;
            margin-top: 18px;
        }

        .login-links .btn-anuluj {
            width: 100%;
            min-height: 42px;
            margin: 0 !important;
            padding: 10px 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            border: 1px solid #3b3b3b;
            border-radius: 7px;
            background: #202020;
            color: #e6e6e6;
            text-decoration: none;
            font-size: 14px;
            font-weight: 700;
            box-sizing: border-box;
            transition:
                border-color 0.2s,
                color 0.2s,
                background 0.2s;
        }

        .login-links .btn-anuluj i {
            width: 18px;
            display: inline-grid;
            place-items: center;
            color: #39ff14;
        }

        .login-links .btn-anuluj:hover {
            border-color: #39ff14;
            background: #242424;
            color: #fff;
        }

        .login-card .input-error {
            border-color: #ff4d4d !important;
        }

        .login-card .custom-error-msg {
            margin: -3px 0 2px;
            color: #ff8d8d;
            font-size: 12px;
            line-height: 1.4;
        }

        .login-info {
            padding: 34px 30px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            background:
                linear-gradient(
                    145deg,
                    rgba(57, 255, 20, 0.09),
                    rgba(255, 255, 255, 0.01)
                ),
                #181818;
        }

        .login-info-icon {
            width: 54px;
            height: 54px;
            margin: 0 auto 20px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(57, 255, 20, 0.45);
            border-radius: 12px;
            background: rgba(57, 255, 20, 0.08);
            color: #39ff14;
            font-size: 23px;
        }

        .login-info h2 {
            margin: 0;
            padding: 0;
            border: 0;
            color: #fff;
            font-size: 25px;
            line-height: 1.2;
            text-align: left;
        }

        .login-info > p {
            margin: 15px 0 0;
            color: #aaa;
            line-height: 1.65;
        }

        .login-info ul {
            display: grid;
            gap: 13px;
            margin: 24px 0;
            padding: 0;
            list-style: none;
        }

        .login-info li {
            display: flex;
            align-items: flex-start;
            gap: 11px;
            color: #ddd;
            line-height: 1.45;
        }

        .login-info li i {
            width: 19px;
            margin-top: 3px;
            color: #39ff14;
            text-align: center;
            flex: 0 0 19px;
        }

        .login-trust {
            padding: 12px 14px;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            border: 1px solid #333;
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.18);
            color: #9b9b9b;
            font-size: 12px;
            line-height: 1.5;
        }

        .login-trust i {
            margin-top: 2px;
            color: #39ff14;
            flex: 0 0 auto;
        }

        .login-legal {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 18px;
            color: #555;
            font-size: 12px;
        }

        .login-legal a {
            color: #888;
            text-decoration: none;
        }

        .login-legal a:hover {
            color: #39ff14;
        }

        @media (max-width: 850px) {
            body.login-page {
                justify-content: flex-start;
                padding-top: calc(22px + env(safe-area-inset-top));
            }

            .login-layout {
                grid-template-columns: 1fr;
                max-width: 520px;
            }

            .login-info {
                padding: 26px 22px;
            }
        }

        @media (max-width: 600px) {
            .login-logo {
                margin-bottom: 18px;
            }

            .login-logo img {
                width: 48px;
                height: 48px;
            }

            .login-logo h1 {
                font-size: 25px;
            }

            .login-card {
                padding: 22px 18px;
                border-radius: 10px;
            }

            .login-card h2 {
                font-size: 21px;
                margin-bottom: 20px;
            }

            .login-info h2 {
                font-size: 22px;
            }
        }

        /* Końcowe poprawki układu */
        @media (min-width: 851px) and (min-height: 700px) {
            body.login-page {
                width: 100%;
                height: 100dvh;
                min-height: 100dvh;
                overflow: hidden;
                box-sizing: border-box;
            }
        }

        @media (max-width: 850px), (max-height: 699px) {
            body.login-page {
                height: auto;
                min-height: 100dvh;
                overflow-y: auto;
            }
        }

        .login-legal a {
            color: #39ff14 !important;
            font-weight: 700;
        }

        .login-legal a:hover {
            color: #63ff46 !important;
        }

        .login-info-icon,
        .login-card h2 i,
        .login-card form > button[type="submit"] i,
        .login-links .btn-anuluj i,
        .login-info li i,
        .login-trust i {
            line-height: 1;
        }

        .login-info-icon i {
            width: auto !important;
            height: auto !important;
            margin: 0 !important;
            padding: 0 !important;
            display: block !important;
            color: inherit !important;
            font-size: 23px;
            line-height: 1 !important;
            text-align: center;
            transform: none !important;
        }

        .login-card h2 i,
        .login-card form > button[type="submit"] i,
        .login-links .btn-anuluj i,
        .login-info li i,
        .login-trust i {
            display: inline-grid;
            place-items: center;
            text-align: center;
        }


        /* Finalna poprawka responsywności */
        @media (max-width: 850px) {
            body.login-page {
                justify-content: flex-start !important;
                min-height: 100dvh;
                height: auto !important;
                padding:
                    calc(20px + env(safe-area-inset-top))
                    calc(14px + env(safe-area-inset-right))
                    calc(24px + env(safe-area-inset-bottom))
                    calc(14px + env(safe-area-inset-left)) !important;
                overflow-y: auto !important;
                overflow-x: hidden;
            }

            .login-logo {
                width: 100%;
                margin-bottom: 18px;
            }

            .login-layout {
                width: min(100%, 560px) !important;
                max-width: 560px;
                grid-template-columns: minmax(0, 1fr) !important;
                gap: 16px;
            }

            .login-card,
            .login-info {
                width: 100%;
                min-width: 0;
            }

            .login-info {
                padding: 26px 22px;
            }
        }

        @media (max-width: 600px) {
            body.login-page {
                padding-right: max(10px, env(safe-area-inset-right)) !important;
                padding-left: max(10px, env(safe-area-inset-left)) !important;
            }

            .login-logo {
                margin-bottom: 14px;
            }

            .login-logo a {
                gap: 8px;
            }

            .login-logo img {
                width: 44px;
                height: 44px;
            }

            .login-logo h1 {
                font-size: 23px;
            }

            .login-card {
                padding: 20px 14px;
                border-radius: 9px;
            }

            .login-card h2 {
                margin-bottom: 18px;
                padding-bottom: 14px;
                font-size: 20px;
            }

            .login-card input[type="text"],
            .login-card input[type="password"] {
                height: 45px;
                font-size: 16px;
            }

            .login-card form > button[type="submit"] {
                min-height: 46px;
            }

            .login-links .btn-anuluj {
                min-height: 44px;
                padding-right: 10px;
                padding-left: 10px;
                font-size: 13px;
                text-align: center;
            }

            .login-info {
                padding: 22px 16px;
                text-align: center;
            }

            .login-info-icon {
                margin: 0 auto 16px;
            }

            .login-info h2 {
                font-size: 21px;
                text-align: center;
            }

            .login-info > p {
                margin-top: 12px;
            }

            .login-info ul {
                margin: 20px 0;
            }

            .login-info li {
                justify-content: center;
                text-align: left;
            }

            .login-trust {
                justify-content: center;
                text-align: left;
            }
        }

        @media (max-width: 380px) {
            .login-card {
                padding-right: 12px;
                padding-left: 12px;
            }

            .login-logo h1 {
                font-size: 21px;
            }

            .login-links .btn-anuluj {
                font-size: 12px;
            }

            .login-info {
                padding-right: 13px;
                padding-left: 13px;
            }
        }

        @media (min-width: 851px) {
            body.login-page {
                overflow-y: auto !important;
            }
        }

        @media (min-width: 851px) and (max-height: 760px) {
            body.login-page {
                justify-content: flex-start !important;
                height: auto !important;
                padding-top: 20px !important;
                padding-bottom: 20px !important;
            }

            .login-logo {
                margin-bottom: 16px;
            }

            .login-layout {
                align-items: start;
            }

            .login-card {
                padding: 22px;
            }

            .login-info {
                padding: 26px 24px;
            }
        }


        html,
        body {
            width: 100%;
            max-width: 100%;
            overflow-x: hidden !important;
        }

        body.login-page {
            position: relative;
            width: 100% !important;
            max-width: 100vw !important;
        }

        body.login-page *,
        body.login-page *::before,
        body.login-page *::after {
            box-sizing: border-box;
            min-width: 0;
        }

        .login-logo,
        .login-layout,
        .login-card,
        .login-info,
        .login-card form,
        .login-card input,
        .login-card button,
        .login-links,
        .login-links a {
            max-width: 100% !important;
        }

        @media (max-width: 600px) {
            .login-layout {
                width: 100% !important;
                max-width: 100% !important;
            }

            .login-card,
            .login-info {
                overflow-wrap: anywhere;
            }
        }

    

        /* =====================================================
           V14 — poprawki ikon na stronie logowania
        ===================================================== */
        .login-info-icon {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 0 !important;
            line-height: 1 !important;
        }

        .login-info-icon > i {
            width: 1em !important;
            height: 1em !important;
            margin: 0 !important;
            padding: 0 !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            position: static !important;
            color: #39ff14 !important;
            font-family: "Font Awesome 6 Free" !important;
            font-style: normal !important;
            font-weight: 900 !important;
            font-size: 23px !important;
            line-height: 1 !important;
            transform: none !important;
            opacity: 1 !important;
            visibility: visible !important;
        }

        .login-card form > button[type="submit"] {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 9px !important;
        }

        .login-card form > button[type="submit"] > i {
            width: 1em !important;
            height: 1em !important;
            margin: 0 !important;
            padding: 0 !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            position: static !important;
            color: currentColor !important;
            font-family: "Font Awesome 6 Free" !important;
            font-style: normal !important;
            font-weight: 900 !important;
            font-size: 15px !important;
            line-height: 1 !important;
            opacity: 1 !important;
            visibility: visible !important;
            transform: none !important;
        }

    

        /* V15 — wyśrodkowanie całego kwadratu z ikoną */
        .login-info > .login-info-icon {
            margin-left: auto !important;
            margin-right: auto !important;
            align-self: center !important;
        }

    

        /* V20 — trochę większy odstęp pod kwadratem z ikoną */
        .login-info > .login-info-icon {
            margin-bottom: 28px !important;
        }

/* =====================================================
   V21 — stabilizacja widoku mobilnego
   ===================================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: clip !important;
    overscroll-behavior-x: none !important;
}

body.login-page {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

@media (max-width: 850px) {
    html {
        width: 100%;
        min-width: 100%;
        overflow-x: clip !important;
        overscroll-behavior: none !important;
    }

    body.login-page {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 100svh !important;
        height: auto !important;
        overflow-x: clip !important;
        overscroll-behavior-x: none !important;
        touch-action: pan-y;
    }

    .login-logo,
    .login-layout,
    .login-card,
    .login-info {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .login-layout {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 600px) {
    body.login-page {
        padding-left: max(10px, env(safe-area-inset-left)) !important;
        padding-right: max(10px, env(safe-area-inset-right)) !important;
    }

    .login-layout {
        width: 100% !important;
        max-width: 100% !important;
    }
}

