/* ==========================================================
   e-DEXEL Platform UI
   Login Screen — Light Edition
========================================================== */

.login-page {
    min-height: 100vh;
    margin: 0;

    background: #f4f4f2;
    color: #151515;
}

.login-page .platform-shell,
.login-page .platform-body,
.login-page .platform-content,
.login-page .platform-content-inner {
    min-height: 100vh;
}

.login-page .platform-body {
    display: block;
}

.login-page .platform-content {
    padding: 0;
    overflow: visible;
    background: transparent;
}


/* ==========================================================
   GŁÓWNY UKŁAD
========================================================== */

.login-layout {
    position: relative;
    isolation: isolate;

    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(420px, 0.85fr);

    min-height: 100vh;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 10% 8%,
            rgba(214, 32, 32, 0.11),
            transparent 28%
        ),
        radial-gradient(
            circle at 48% 90%,
            rgba(0, 0, 0, 0.035),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8f8f6 52%,
            #eeeeeb 100%
        );
}

.login-layout::before {
    content: "";

    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.045) 1px,
            transparent 1px
        );

    background-size: 48px 48px;

    -webkit-mask-image: linear-gradient(
        to right,
        #000000 0%,
        rgba(0, 0, 0, 0.86) 52%,
        transparent 82%
    );

    mask-image: linear-gradient(
        to right,
        #000000 0%,
        rgba(0, 0, 0, 0.86) 52%,
        transparent 82%
    );

    pointer-events: none;
    z-index: -2;
}

.login-layout::after {
    content: "";

    position: absolute;
    top: -190px;
    left: -170px;

    width: 620px;
    height: 620px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(211, 38, 38, 0.12) 0%,
            rgba(211, 38, 38, 0.035) 42%,
            transparent 72%
        );

    pointer-events: none;
    z-index: -1;
}


/* ==========================================================
   PANEL MARKI
========================================================== */

.login-brand-panel {
    position: relative;

    min-width: 0;
    min-height: 100vh;
    padding: clamp(38px, 5vw, 76px);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    overflow: hidden;
    color: #171717;
}

.login-brand-panel::before {
    content: "";

    position: absolute;
    left: 8%;
    bottom: -430px;

    width: 820px;
    height: 820px;

    border: 1px solid rgba(0, 0, 0, 0.055);
    border-radius: 50%;

    box-shadow:
        0 0 0 96px rgba(0, 0, 0, 0.018),
        0 0 0 192px rgba(0, 0, 0, 0.012);

    pointer-events: none;
    z-index: 0;
}

.login-brand-panel::after {
    content: "";

    position: absolute;
    top: 0;
    right: 0;

    width: 1px;
    height: 100%;

    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 0, 0, 0.08) 15%,
        rgba(0, 0, 0, 0.08) 85%,
        transparent
    );

    pointer-events: none;
    z-index: 1;
}

.login-brand-header,
.login-brand-content,
.login-brand-footer {
    position: relative;
    z-index: 2;
}


/* ==========================================================
   NAGŁÓWEK MARKI
========================================================== */

.login-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.login-brand-signature {
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-brand-symbol {
    display: block;

    width: auto;
    height: clamp(48px, 5vw, 68px);

    object-fit: contain;

    filter:
        drop-shadow(0 12px 22px rgba(0, 0, 0, 0.10));
}

/*
   Ukrywamy dodatkowy napis e-DEXEL.
   Zostaje wyłącznie główne logo PNG.
*/
.login-brand-wordmark {
    display: none;
}

.login-brand-version {
    color: #777777;

    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}


/* ==========================================================
   TREŚĆ MARKI
========================================================== */

.login-brand-content {
    width: min(760px, 100%);
    padding: 80px 0;
}

.login-brand-eyebrow {
    margin: 0 0 28px;

    color: #777777;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.login-brand-title {
    margin: 0;

    color: #101010;

    font-size: clamp(52px, 7vw, 112px);
    font-weight: 800;
    line-height: 0.88;
    letter-spacing: -0.065em;
    text-transform: uppercase;
}

.login-brand-title span {
    display: block;
}

.login-brand-title span:first-child {
    color: #111111;
}

.login-brand-title span:last-child {
    margin-top: 0.04em;

    color: transparent;

    -webkit-text-stroke: 1.5px rgba(17, 17, 17, 0.72);
    text-stroke: 1.5px rgba(17, 17, 17, 0.72);
}

.login-brand-description {
    max-width: 580px;
    margin: 36px 0 0;

    color: #656565;

    font-size: 14px;
    line-height: 1.8;
}


/* ==========================================================
   STOPKA MARKI
========================================================== */

.login-brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    color: #858585;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
}

.login-brand-footer-line {
    flex: 1;
    height: 1px;

    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.04),
        rgba(0, 0, 0, 0.14),
        rgba(0, 0, 0, 0.04)
    );
}


/* ==========================================================
   PANEL FORMULARZA
========================================================== */

.login-form-panel {
    position: relative;

    min-height: 100vh;
    padding: clamp(32px, 5vw, 76px);

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(250, 250, 249, 0.98) 100%
        );

    border-left: 1px solid rgba(0, 0, 0, 0.07);

    box-shadow:
        -28px 0 70px rgba(0, 0, 0, 0.06);
}

.login-form-panel::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 1px;
    height: 100%;

    background: linear-gradient(
        to bottom,
        transparent,
        rgba(211, 38, 38, 0.18) 18%,
        rgba(0, 0, 0, 0.07) 50%,
        rgba(211, 38, 38, 0.10) 82%,
        transparent
    );
}

.login-form-container {
    width: min(420px, 100%);
}


/* ==========================================================
   LOGO MOBILNE
========================================================== */

.login-mobile-brand {
    display: none;
    align-items: center;
    gap: 14px;

    margin-bottom: 44px;
}

.login-mobile-brand-symbol {
    display: block;

    width: auto;
    height: 46px;

    object-fit: contain;
}

.login-mobile-brand-wordmark {
    display: none;
}


/* ==========================================================
   NAGŁÓWEK FORMULARZA
========================================================== */

.login-heading-group {
    margin-bottom: 42px;
}

.login-form-eyebrow {
    margin: 0 0 14px;

    color: #8a8a8a;

    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.login-heading {
    margin: 0;

    color: #0a0a0a;

    font-size: clamp(38px, 4vw, 52px);
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.055em;
}

.login-subheading {
    max-width: 340px;
    margin: 18px 0 0;

    color: #747474;

    font-size: 14px;
    line-height: 1.7;
}


/* ==========================================================
   FORMULARZ
========================================================== */

.login-form {
    width: 100%;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .form-label {
    display: block;
    margin-bottom: 10px;

    color: #242424;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
}

.login-form .form-control {
    width: 100%;
    min-height: 54px;
    padding: 14px 0;

    border: 0;
    border-bottom: 1px solid #cfcfcf;
    border-radius: 0;
    outline: none;

    background: transparent;
    color: #101010;

    font-size: 15px;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.login-form .form-control::placeholder {
    color: #a5a5a5;
}

.login-form .form-control:hover {
    border-bottom-color: #777777;
}

.login-form .form-control:focus {
    border-bottom-color: #d32626;
    box-shadow: 0 1px 0 #d32626;
}

.login-form .form-control.has-error {
    border-bottom-color: var(--danger);
    box-shadow: 0 1px 0 var(--danger);
}

.login-form .field-errors {
    margin: 9px 0 0;
    padding: 0;

    color: var(--danger);

    font-size: 12px;
    line-height: 1.5;
    list-style: none;
}

.login-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin: 8px 0 32px;
}

.login-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: #5d5d5d;

    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.login-checkbox input {
    appearance: none;
    -webkit-appearance: none;

    position: relative;

    width: 18px;
    height: 18px;
    margin: 0;

    border: 1px solid #bcbcbc;
    border-radius: 4px;

    background: #ffffff;

    cursor: pointer;

    transition:
        background-color 150ms ease,
        border-color 150ms ease;
}

.login-checkbox input::after {
    content: "";

    position: absolute;
    left: 5px;
    top: 2px;

    width: 5px;
    height: 9px;

    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    opacity: 0;

    transform: rotate(45deg) scale(0.8);

    transition:
        opacity 150ms ease,
        transform 150ms ease;
}

.login-checkbox input:checked {
    border-color: #d32626;
    background: #d32626;
}

.login-checkbox input:checked::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.login-checkbox input:focus-visible {
    outline: 3px solid rgba(211, 38, 38, 0.16);
    outline-offset: 2px;
}


/* ==========================================================
   PRZYCISK
========================================================== */

.login-submit {
    position: relative;

    width: 100%;
    min-height: 58px;
    padding: 15px 24px;

    border: 1px solid #111111;
    border-radius: 0;

    overflow: hidden;

    background: #111111;
    color: #ffffff;

    font: inherit;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        color 180ms ease,
        border-color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.login-submit::before {
    content: "";

    position: absolute;
    inset: 0;

    background: #d32626;

    transform: translateX(-101%);
    transition: transform 220ms ease;
}

.login-submit span {
    position: relative;
    z-index: 1;
}

.login-submit:hover {
    border-color: #d32626;
    color: #ffffff;

    box-shadow: 8px 8px 0 rgba(211, 38, 38, 0.16);

    transform: translate(-3px, -3px);
}

.login-submit:hover::before {
    transform: translateX(0);
}

.login-submit:active {
    box-shadow: 3px 3px 0 rgba(211, 38, 38, 0.14);
    transform: translate(-1px, -1px);
}

.login-submit:focus-visible {
    outline: 3px solid rgba(211, 38, 38, 0.20);
    outline-offset: 4px;
}


/* ==========================================================
   KOMUNIKATY
========================================================== */

.login-flash-messages {
    display: grid;
    gap: 10px;

    margin-bottom: 28px;
}

.login-flash-message {
    padding: 13px 15px;

    border: 1px solid #d7d7d7;
    border-left-width: 3px;

    background: #f7f7f7;
    color: #333333;

    font-size: 13px;
    line-height: 1.55;
}

.login-flash-message.danger,
.login-flash-message.error {
    border-left-color: var(--danger);
    background: #fff7f7;
    color: #991b1b;
}

.login-flash-message.warning {
    border-left-color: var(--warning);
    background: #fffbeb;
    color: #854d0e;
}

.login-flash-message.success {
    border-left-color: var(--success);
    background: #f4fbf6;
    color: #166534;
}

.login-flash-message.info {
    border-left-color: #444444;
}


/* ==========================================================
   INFORMACJA O BEZPIECZEŃSTWIE
========================================================== */

.login-security-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-top: 32px;
    padding-top: 24px;

    border-top: 1px solid #e3e3e3;

    color: #8a8a8a;

    font-size: 11px;
    line-height: 1.65;
}

.login-security-mark {
    flex: 0 0 auto;

    width: 18px;
    height: 18px;
    margin-top: 1px;

    display: grid;
    place-items: center;

    border: 1px solid #bcbcbc;
    border-radius: 50%;

    color: #555555;

    font-size: 9px;
    font-weight: 800;
}


/* ==========================================================
   MOTYW CIEMNY

   Login pozostaje jasny również wtedy, gdy użytkownik ma
   zapisany ciemny motyw platformy.
========================================================== */

html[data-theme="dark"] .login-layout {
    background:
        radial-gradient(
            circle at 10% 8%,
            rgba(214, 32, 32, 0.11),
            transparent 28%
        ),
        radial-gradient(
            circle at 48% 90%,
            rgba(0, 0, 0, 0.035),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8f8f6 52%,
            #eeeeeb 100%
        );
}

html[data-theme="dark"] .login-brand-panel {
    color: #171717;
}

html[data-theme="dark"] .login-form-panel {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(250, 250, 249, 0.98) 100%
        );
}

html[data-theme="dark"] .login-heading,
html[data-theme="dark"] .login-form .form-label {
    color: #0a0a0a;
}

html[data-theme="dark"] .login-subheading,
html[data-theme="dark"] .login-form-eyebrow,
html[data-theme="dark"] .login-checkbox,
html[data-theme="dark"] .login-security-note {
    color: #747474;
}

html[data-theme="dark"] .login-form .form-control {
    border-bottom-color: #cfcfcf;
    color: #101010;
}

html[data-theme="dark"] .login-form .form-control::placeholder {
    color: #a5a5a5;
}

html[data-theme="dark"] .login-checkbox input {
    border-color: #bcbcbc;
    background: #ffffff;
}

html[data-theme="dark"] .login-checkbox input:checked {
    border-color: #d32626;
    background: #d32626;
}

html[data-theme="dark"] .login-checkbox input:checked::after {
    border-color: #ffffff;
}

html[data-theme="dark"] .login-submit {
    border-color: #111111;
    background: #111111;
    color: #ffffff;
}

html[data-theme="dark"] .login-security-note {
    border-top-color: #e3e3e3;
}

html[data-theme="dark"] .login-security-mark {
    border-color: #bcbcbc;
    color: #555555;
}


/* ==========================================================
   RESPONSYWNOŚĆ
========================================================== */

@media (max-width: 1050px) {
    .login-layout {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(390px, 0.92fr);
    }

    .login-brand-title {
        font-size: clamp(48px, 6.8vw, 82px);
    }

    .login-brand-description {
        max-width: 480px;
    }
}

@media (max-width: 860px) {
    .login-layout {
        display: block;

        min-height: 100vh;

        background:
            linear-gradient(
                180deg,
                #ffffff 0%,
                #f7f7f5 100%
            );
    }

    .login-layout::before,
    .login-layout::after,
    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;
        padding: 48px 30px;

        border-left: 0;
        box-shadow: none;
    }

    .login-form-panel::before {
        display: none;
    }

    .login-mobile-brand {
        display: flex;
    }
}

@media (max-width: 520px) {
    .login-form-panel {
        align-items: flex-start;
        padding: 30px 22px 42px;
    }

    .login-form-container {
        width: 100%;
    }

    .login-mobile-brand {
        margin-bottom: 54px;
    }

    .login-mobile-brand-symbol {
        height: 40px;
    }

    .login-heading-group {
        margin-bottom: 36px;
    }

    .login-heading {
        font-size: 38px;
    }

    .login-form .form-control {
        min-height: 52px;
    }

    .login-submit {
        min-height: 56px;
    }
}

@media (max-height: 720px) and (min-width: 861px) {
    .login-brand-panel,
    .login-form-panel {
        min-height: 720px;
    }

    .login-brand-content {
        padding: 48px 0;
    }

    .login-brand-title {
        font-size: clamp(48px, 6vw, 76px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-submit,
    .login-submit::before,
    .login-form .form-control,
    .login-checkbox input,
    .login-checkbox input::after {
        transition: none;
    }
}