:root {
    --blue-primary: #2f67e8;
    --blue-dark: #07145f;
    --surface: #f3f3f3;
    --text-dark: #1b1b1b;
    --text-light: #ffffff;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    --cookie-height: 44px;
    --footer-height-mobile: 96px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Inter", sans-serif;
    color: var(--text-dark);
    background: #ffffff;
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
}

.top-cookie-bar {
    background: var(--blue-primary);
    color: var(--text-light);
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
    padding: 10px 16px;
    position: relative;
    z-index: 20;
}

.top-cookie-bar a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
}

.login-layout {
    min-height: calc(100vh - var(--cookie-height));
    display: grid;
    grid-template-columns: 58% 42%;
}

/* LEFT PANEL */
.brand-panel {
    position: relative;
    min-height: calc(100vh - var(--cookie-height));
    padding: 48px 56px 88px;
    background-image: url("bacground.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

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

.brand-logo {
    margin-bottom: 180px;
}

.brand-logo img {
    display: block;
    width: 380px;
    max-width: 100%;
    height: auto;
}

.brand-content h1 {
    margin: 0;
    color: #ffffff;
    font-size: 64px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
    max-width: 520px;
}

.brand-content sup {
    font-size: 18px;
    top: -1em;
    position: relative;
}

.brand-footer {
    position: absolute;
    left: 56px;
    right: 56px;
    bottom: 20px;
    z-index: 2;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px 24px;
    flex-wrap: wrap;

    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
}

.brand-footer a {
    color: #ffffff;
    text-decoration: underline;
    white-space: nowrap;
}

.login-message {
    min-height: 20px;
    font-size: 14px;
    line-height: 1.4;
    margin-top: -4px;
    margin-bottom: 4px;
}

.login-message.error {
    color: #b42318;
}

.login-message.success {
    color: #027a48;
}

/* RIGHT PANEL */
.form-panel {
    background:
        linear-gradient(rgba(10, 22, 96, 0.18), rgba(10, 22, 96, 0.18)),
        linear-gradient(135deg, #224cbf 0%, #142b8a 45%, #07145f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    min-height: calc(100vh - var(--cookie-height));
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 42px 38px 28px;
}

.login-card h2 {
    margin: 0 0 28px;
    text-align: center;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1a1a1a;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
}

.form-group input {
    width: 100%;
    height: 48px;
    border: 1px solid #3a3a3a;
    background: #ffffff;
    padding: 0 14px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(47, 103, 232, 0.14);
}

.btn-primary {
    margin-top: 6px;
    width: 100%;
    height: 50px;
    border: 0;
    background: var(--blue-primary);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
    background: #255bdd;
}

.btn-primary:active {
    transform: translateY(1px);
}

.login-links {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.login-links a {
    font-size: 15px;
    color: #232323;
    text-decoration: underline;
}

/* TABLET */
@media (max-width: 1024px) {
    .login-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .brand-panel {
        min-height: 320px;
        padding: 36px 28px 84px;
    }

    .brand-logo {
        margin-bottom: 90px;
    }

    .brand-logo img {
        width: 350px;
    }

    .brand-content h1 {
        font-size: 48px;
        max-width: 420px;
    }

    .brand-footer {
        left: 28px;
        right: 28px;
        bottom: 18px;
        font-size: 13px;
    }

    .form-panel {
        min-height: auto;
        padding: 40px 20px 50px;
    }
}

/* MOBILE */
@media (max-width: 640px) {
    :root {
        --cookie-height: 48px;
        --footer-height-mobile: 96px;
    }

    html,
    body {
        min-height: 100%;
    }

    body {
        min-height: 100vh;
        background: #f3f3f3;
    }

    .top-cookie-bar {
        font-size: 13px;
        padding: 10px 14px;
    }

    .login-layout {
        min-height: calc(100vh - var(--cookie-height));
        display: flex;
        flex-direction: column;
    }

    .brand-panel {
        position: relative;
        min-height: 240px;
        padding: 20px 16px 0;
        background-image: url("bacground.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

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

    .brand-logo {
        margin-bottom: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 170px;
    }

    .brand-logo img {
        width: 280px;
        max-width: 100%;
        height: auto;
    }

    .brand-content h1 {
        display: none;
    }

    .form-panel {
        flex: 1 1 auto;
        min-height: 0;
        background: var(--surface);
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .login-card {
        width: 100%;
        max-width: none;
        border-radius: 0;
        box-shadow: none;
        padding: 34px 20px 28px;
        background: var(--surface);
    }

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

    .form-group input,
    .btn-primary {
        height: 50px;
    }

    .brand-footer {
        position: static;
        left: auto;
        right: auto;
        bottom: auto;

        min-height: var(--footer-height-mobile);
        padding: 16px;
        margin-top: auto;

        display: flex;
        justify-content: center;
        align-items: center;
        align-content: center;
        gap: 12px 22px;
        flex-wrap: wrap;
        text-align: center;

        background: var(--blue-primary);
        color: #ffffff;
        font-size: 13px;
        line-height: 1.35;
    }

    .brand-footer a {
        color: #ffffff;
        text-decoration: underline;
        white-space: normal;
    }
}