:root {
    --auth-bg: #f5f6f8;
    --auth-surface: #ffffff;

    --auth-text: #17191d;
    --auth-text-soft: #6c727d;
    --auth-text-light: #949aa5;

    --auth-border: #e3e6eb;
    --auth-border-focus: #22262d;

    --auth-dark: #16191f;
    --auth-dark-soft: #20242c;

    --auth-accent: #c42b2f;
    --auth-accent-hover: #aa2024;

    --auth-danger-bg: #fff3f3;
    --auth-danger-border: #ffd8d8;
    --auth-danger-text: #b4232a;

    --auth-radius: 14px;

    --auth-shadow:
        0 20px 60px rgba(25, 30, 40, 0.08);
}


* {
    box-sizing: border-box;
}


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


body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--auth-text);
    background: var(--auth-bg);

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


.auth-body {
    min-height: 100vh;
}


.auth-layout {
    display: grid;
    grid-template-columns:
        minmax(420px, 0.95fr)
        minmax(540px, 1.05fr);

    min-height: 100vh;
}


/* ======================================================
   BRAND SIDE
====================================================== */

.auth-brand {
    position: relative;

    min-height: 100vh;

    padding: 52px 58px;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            var(--auth-dark) 0%,
            var(--auth-dark-soft) 100%
        );

    overflow: hidden;
}


.auth-brand__inner {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;
    min-height: calc(100vh - 104px);
}


.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 13px;

    width: fit-content;

    color: inherit;
    text-decoration: none;
}


.auth-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 12px;

    font-size: 22px;
    font-weight: 750;
    line-height: 1;

    color: #ffffff;
    background: var(--auth-accent);

    box-shadow:
        0 10px 30px rgba(196, 43, 47, 0.25);
}


.auth-logo__name {
    font-size: 21px;
    font-weight: 680;
    letter-spacing: -0.02em;
}


.auth-brand__content {
    max-width: 560px;

    margin-top: auto;
    margin-bottom: auto;

    padding: 80px 0;
}


.auth-brand__eyebrow {
    margin-bottom: 23px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.52);
}


.auth-brand__title {
    margin: 0;

    font-size: clamp(42px, 4vw, 68px);
    font-weight: 650;
    line-height: 1.03;
    letter-spacing: -0.052em;

    color: #ffffff;
}


.auth-brand__text {
    max-width: 510px;

    margin: 28px 0 0;

    font-size: 17px;
    line-height: 1.7;

    color: rgba(255, 255, 255, 0.62);
}


.auth-brand__footer {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 13px;
    font-weight: 550;

    color: rgba(255, 255, 255, 0.47);
}


.auth-brand__status {
    display: block;

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #53c67a;

    box-shadow:
        0 0 0 4px rgba(83, 198, 122, 0.12);
}


.auth-brand__decor {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}


.auth-brand__decor--one {
    top: -130px;
    right: -160px;

    width: 480px;
    height: 480px;

    border:
        1px solid rgba(255, 255, 255, 0.055);
}


.auth-brand__decor--two {
    top: -30px;
    right: -60px;

    width: 280px;
    height: 280px;

    border:
        1px solid rgba(255, 255, 255, 0.045);
}


/* ======================================================
   FORM SIDE
====================================================== */

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;

    padding: 54px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fafbfc 100%
        );
}


.auth-form-wrap {
    width: 100%;
    max-width: 430px;
}


.auth-mobile-logo {
    display: none;
}


.auth-form-header {
    margin-bottom: 35px;
}


.auth-form-header__label {
    margin-bottom: 12px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;

    color: var(--auth-accent);
}


.auth-form-header__title {
    margin: 0;

    font-size: 35px;
    font-weight: 680;
    line-height: 1.15;
    letter-spacing: -0.035em;

    color: var(--auth-text);
}


.auth-form-header__text {
    margin: 12px 0 0;

    font-size: 15px;
    line-height: 1.6;

    color: var(--auth-text-soft);
}


/* ======================================================
   ALERT
====================================================== */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-bottom: 24px;
    padding: 14px 15px;

    border: 1px solid var(--auth-danger-border);
    border-radius: 12px;

    font-size: 14px;
    line-height: 1.45;

    color: var(--auth-danger-text);
    background: var(--auth-danger-bg);
}


.auth-alert__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;

    margin-top: 1px;

    border-radius: 50%;

    font-size: 12px;
    font-weight: 800;

    color: #ffffff;
    background: var(--auth-danger-text);
}


.auth-alert__text {
    margin-top: 2px;

    color: #8f3a3d;
}


/* ======================================================
   FORM
====================================================== */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}


.auth-field__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.auth-field__label {
    display: inline-block;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 650;

    color: #3e434b;
}


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


.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;

    color: #9ba0a9;

    transform: translateY(-50%);

    pointer-events: none;
}


.auth-input-icon svg {
    width: 20px;
    height: 20px;
}


.auth-input {
    display: block;

    width: 100%;
    height: 52px;

    padding:
        0
        46px
        0
        48px;

    border: 1px solid var(--auth-border);
    border-radius: 12px;
    outline: none;

    font-size: 15px;

    color: var(--auth-text);
    background: #ffffff;

    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}


.auth-input::placeholder {
    color: #b0b4bc;
}


.auth-input:hover {
    border-color: #cdd1d8;
}


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

    box-shadow:
        0 0 0 3px rgba(25, 29, 35, 0.07);
}


.auth-input:focus + .auth-password-toggle {
    color: #5f646d;
}


.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    padding: 0;

    border: 0;
    border-radius: 8px;

    color: #9ba0a9;
    background: transparent;

    transform: translateY(-50%);

    transition:
        color 0.16s ease,
        background 0.16s ease;
}


.auth-password-toggle:hover {
    color: #555b64;
    background: #f3f4f6;
}


.auth-password-toggle svg {
    width: 20px;
    height: 20px;
}


/* ======================================================
   SUBMIT
====================================================== */

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    width: 100%;
    height: 54px;

    margin-top: 4px;

    border: 0;
    border-radius: 12px;

    font-size: 15px;
    font-weight: 680;

    color: #ffffff;
    background: var(--auth-dark);

    box-shadow:
        0 10px 25px rgba(20, 24, 30, 0.12);

    transition:
        transform 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}


.auth-submit:hover {
    background: #272c34;

    box-shadow:
        0 13px 30px rgba(20, 24, 30, 0.16);
}


.auth-submit:active {
    transform: translateY(1px);
}


.auth-submit svg {
    width: 19px;
    height: 19px;

    transition:
        transform 0.15s ease;
}


.auth-submit:hover svg {
    transform: translateX(2px);
}


.auth-form-footer {
    margin-top: 32px;

    padding-top: 24px;

    border-top: 1px solid #eceef1;

    font-size: 12px;
    line-height: 1.5;
    text-align: center;

    color: var(--auth-text-light);
}


/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 980px) {

    .auth-layout {
        grid-template-columns:
            minmax(330px, 0.8fr)
            minmax(460px, 1.2fr);
    }


    .auth-brand {
        padding: 40px;
    }


    .auth-brand__inner {
        min-height: calc(100vh - 80px);
    }


    .auth-brand__title {
        font-size: 45px;
    }


    .auth-form-side {
        padding: 42px;
    }

}


@media (max-width: 760px) {

    .auth-layout {
        display: block;
    }


    .auth-brand {
        display: none;
    }


    .auth-form-side {
        align-items: flex-start;

        min-height: 100vh;

        padding:
            38px
            24px
            30px;
    }


    .auth-form-wrap {
        max-width: 470px;
    }


    .auth-mobile-logo {
        display: flex;
        align-items: center;
        gap: 11px;

        margin-bottom: 60px;
    }


    .auth-mobile-logo .auth-logo__mark {
        width: 38px;
        height: 38px;

        border-radius: 11px;

        font-size: 20px;
    }


    .auth-mobile-logo .auth-logo__name {
        font-size: 19px;
    }


    .auth-form-header__title {
        font-size: 31px;
    }

}


@media (max-width: 420px) {

    .auth-form-side {
        padding-left: 19px;
        padding-right: 19px;
    }


    .auth-mobile-logo {
        margin-bottom: 48px;
    }


    .auth-form-header {
        margin-bottom: 28px;
    }


    .auth-form-header__title {
        font-size: 29px;
    }


    .auth-input,
    .auth-submit {
        height: 52px;
    }

}


/* ======================================================
   ZAPISKA LOGIN — CHINA BRAND V1
====================================================== */

:root {
    --auth-hero-image:
        url("../images/auth/login-china-v1.png");
}


.auth-brand {
    background-image:
        linear-gradient(
            90deg,
            rgba(10, 14, 19, 0.91) 0%,
            rgba(12, 16, 21, 0.79) 42%,
            rgba(13, 16, 20, 0.44) 100%
        ),
        var(--auth-hero-image);

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}


.auth-brand::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.08) 0%,
            rgba(0, 0, 0, 0.03) 55%,
            rgba(0, 0, 0, 0.35) 100%
        );

    pointer-events: none;
}


.auth-logo__mark {
    width: 54px;
    height: 54px;

    padding: 0;

    border-radius: 12px;

    background: transparent;
    box-shadow: none;

    overflow: hidden;
}


.auth-logo__mark img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


.auth-logo__name {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 26px;
    font-weight: 700;

    letter-spacing: -0.025em;
}


.auth-brand__eyebrow {
    color: rgba(255, 255, 255, 0.62);
}


.auth-brand__title {
    max-width: 620px;

    text-shadow:
        0 3px 28px rgba(0, 0, 0, 0.34);
}


.auth-brand__title-accent {
    color: #ef4b50;
}


.auth-brand__text {
    max-width: 570px;

    color: rgba(255, 255, 255, 0.72);

    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.28);
}


.auth-brand__footer {
    color: rgba(255, 255, 255, 0.63);
}


.auth-mobile-logo .auth-logo__mark {
    width: 44px;
    height: 44px;
}


.auth-mobile-logo .auth-logo__name {
    color: #181b20;
}


@media (max-width: 1100px) {

    .auth-brand {
        background-position: 57% center;
    }

}


/* ======================================================
   ROTATING LOGIN BACKGROUNDS
   File: app/static/css/auth.css
====================================================== */

:root {
    --auth-hero-image: url("/static/images/auth/rotating/login-bg-01.png");
}

.auth-brand {
    background-image:
        linear-gradient(
            90deg,
            rgba(10, 14, 19, 0.88) 0%,
            rgba(12, 16, 21, 0.72) 42%,
            rgba(13, 16, 20, 0.34) 100%
        ),
        var(--auth-hero-image);

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}
