/* Bereon V4 — centered login design */

body:has(.v4-login-page) {
    margin: 0;
    background: #071528;
    color: #f5f7fc;
    font-family: Inter, Arial, sans-serif;
}

body:has(.v4-login-page) .topbar,
body:has(.v4-login-page) .footer,
body:has(.v4-login-page) .ambient-light,
body:has(.v4-login-page) .page-grid {
    display: none !important;
}

body:has(.v4-login-page) .page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.v4-login-page {
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    padding: 65px 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(
            ellipse at 50% 4%,
            rgba(31, 65, 111, 0.30),
            transparent 58%
        ),
        #071528;
}

/* Logo */

.v4-login-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 45px;
}

.v4-login-symbol {
    display: block;
    width: 85px;
    height: 85px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(255, 43, 73, .45));
}

.v4-login-brand-copy {
    text-align: left;
}

.v4-login-brand-name {
    color: #fff;
    font-size: clamp(30px, 4vw, 45px);
    font-weight: 700;
    letter-spacing: .19em;
    line-height: 1.1;
}

.v4-login-brand-subtitle {
    margin-top: 8px;
    color: #a1b2c9;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .25em;
    white-space: nowrap;
}

/* Card */

.v4-login-card {
    box-sizing: border-box;
    width: min(100%, 570px);
    padding: 46px 48px 50px;
    border: 1px solid #2c496e;
    border-radius: 13px;
    background: linear-gradient(
        145deg,
        rgba(17, 36, 62, .98),
        rgba(10, 25, 46, .98)
    );
    box-shadow:
        0 25px 80px rgba(0, 0, 0, .23),
        0 0 25px rgba(31, 75, 125, .07);
}

.v4-login-card h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 36px;
    font-weight: 750;
    letter-spacing: -.04em;
}

.v4-login-description {
    margin: 0 0 37px;
    color: #9daec6;
    font-size: 15px;
    line-height: 1.5;
}

/* Fields */

.v4-login-form {
    display: flex;
    flex-direction: column;
}

.v4-login-field {
    margin-bottom: 26px;
}

.v4-login-field label {
    display: block;
    margin-bottom: 10px;
    color: #edf2fa;
    font-size: 15px;
    font-weight: 600;
}

.v4-login-input {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 17px;
    border: 1px solid #385374;
    border-radius: 10px;
    background: #142a46;
    transition: border-color .15s, box-shadow .15s;
}

.v4-login-input:focus-within {
    border-color: #ef4562;
    box-shadow: 0 0 0 3px rgba(239, 69, 98, .13);
}

.v4-login-input-icon {
    color: #a8c1df;
    font-size: 22px;
    width: 24px;
    flex-shrink: 0;
    text-align: center;
}

.v4-login-input input {
    width: 100%;
    height: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    box-shadow: none;
}

.v4-login-input input::placeholder {
    color: #92a5bf;
    opacity: 1;
}

.v4-password-toggle {
    border: 0;
    padding: 7px;
    background: transparent;
    color: #bfd1e8;
    cursor: pointer;
    font-size: 13px;
}

.v4-login-recovery {
    margin-top: -8px;
    margin-bottom: 34px;
    text-align: right;
}

.v4-login-recovery a {
    color: #b8d3f5;
    text-decoration: none;
    font-size: 14px;
}

.v4-login-recovery a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Submit */

.v4-login-submit {
    min-height: 66px;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: #fb234d;
    color: #fff;
    font-family: inherit;
    font-size: 18px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(251, 35, 77, .19);
    transition: background .2s;
}

.v4-login-submit:hover {
    background: #e91c45;
}

.v4-login-submit span {
    padding-left: 8px;
}

.v4-login-submit:focus-visible,
.v4-password-toggle:focus-visible,
.v4-login-recovery a:focus-visible {
    outline: 3px solid #ff8095;
    outline-offset: 4px;
}

.v4-login-error,
.v4-login-success {
    padding: 13px 15px;
    margin-bottom: 23px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.v4-login-error {
    color: #ffb8c5;
    background: rgba(251, 35, 77, .12);
    border: 1px solid rgba(251, 35, 77, .3);
}

.v4-login-success {
    color: #aef0c0;
    background: rgba(38, 177, 94, .12);
    border: 1px solid rgba(38, 177, 94, .3);
}

.v4-login-copyright {
    color: #8599b4;
    font-size: 13px;
    text-align: center;
    margin: 80px 0 0;
}

/* Responsive */

@media (max-width: 600px) {
    .v4-login-page {
        padding: 36px 18px 24px;
    }

    .v4-login-brand {
        gap: 12px;
        margin-bottom: 34px;
    }

    .v4-login-symbol {
        width: 59px;
        height: 59px;
    }

    .v4-login-brand-name {
        font-size: 29px;
        letter-spacing: .13em;
    }

    .v4-login-brand-subtitle {
        font-size: 7px;
        letter-spacing: .17em;
    }

    .v4-login-card {
        padding: 30px 24px 35px;
    }

    .v4-login-card h1 {
        font-size: 31px;
    }

    .v4-login-copyright {
        margin-top: 50px;
    }
}

/* V4 full logo correction */
.v4-login-brand {
    width: 100%;
    margin-bottom: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v4-login-full-logo {
    display: block;
    width: min(400px, 85vw);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(238, 39, 69, .15));
}

@media (max-width: 600px) {
    .v4-login-full-logo {
        width: min(310px, 85vw);
    }
}

/* Forgot / reset password (same V4 card as Log In) */
a.v4-login-submit { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; box-sizing: border-box; }
.v4-login-back { text-align: center; margin: 18px 0 0; }
