:root {
    --login-bg: #02060c;
    --login-panel: rgba(7, 16, 28, 0.88);
    --login-border: rgba(91, 158, 246, 0.18);
    --login-text: #f2f6fb;
    --login-muted: #7f8c9f;
    --login-blue: #1688ff;
    --login-blue-light: #67b7ff;
    --login-error: #ff6675;
}

body {
    margin: 0;
    background: var(--login-bg);
}

.login-page,
.login-page * {
    box-sizing: border-box;
}

.login-page {
    position: relative;
    display: grid;
    min-height: 100svh;
    place-items: center;
    overflow: hidden;
    padding: 48px;
    background:
        radial-gradient(
            circle at 22% 48%,
            rgba(0, 103, 235, 0.16),
            transparent 30%
        ),
        radial-gradient(
            circle at 78% 45%,
            rgba(0, 74, 170, 0.11),
            transparent 31%
        ),
        linear-gradient(135deg, #02060c, #06101c 52%, #02060c);
    color: var(--login-text);
    font-family: Inter, Arial, sans-serif;
    isolation: isolate;
}

.login-page::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    opacity: 0.15;
    background-image:
        linear-gradient(
            rgba(82, 137, 201, 0.1) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(82, 137, 201, 0.1) 1px,
            transparent 1px
        );
    background-size: 82px 82px;
    mask-image:
        radial-gradient(
            ellipse at center,
            #000 0%,
            transparent 73%
        );
    content: "";
}

.login-page__glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.login-page__glow--left {
    top: 22%;
    left: 5%;
    width: 520px;
    height: 520px;
    background: rgba(0, 101, 230, 0.11);
}

.login-page__glow--right {
    right: 5%;
    bottom: 10%;
    width: 440px;
    height: 440px;
    background: rgba(0, 72, 165, 0.08);
}

.login-back {
    position: absolute;
    z-index: 5;
    top: 32px;
    left: 38px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #758499;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: color 180ms ease;
}

.login-back span {
    color: var(--login-blue-light);
    font-size: 18px;
}

.login-back:hover {
    color: #fff;
}

.login-shell {
    display: grid;
    width: min(100%, 1080px);
    min-height: 620px;
    overflow: hidden;
    grid-template-columns: minmax(0, 1.03fr) minmax(430px, 0.97fr);
    border: 1px solid var(--login-border);
    border-radius: 28px;
    background: rgba(4, 11, 20, 0.79);
    box-shadow:
        0 45px 120px rgba(0, 0, 0, 0.55),
        0 0 90px rgba(0, 89, 205, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

/* Левая часть */

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.065);
    background:
        radial-gradient(
            circle at center,
            rgba(0, 105, 235, 0.15),
            transparent 46%
        ),
        rgba(4, 12, 22, 0.62);
}

.login-visual__rings {
    position: absolute;
    top: 46%;
    left: 50%;
    width: 460px;
    height: 460px;
    border: 1px solid rgba(48, 139, 248, 0.12);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.login-visual__rings::before,
.login-visual__rings::after {
    position: absolute;
    border: 1px solid rgba(48, 139, 248, 0.08);
    border-radius: 50%;
    content: "";
}

.login-visual__rings::before {
    inset: 55px;
}

.login-visual__rings::after {
    inset: 110px;
}

.login-visual__logo {
    position: relative;
    z-index: 2;
    width: 340px;
    max-height: 430px;
    object-fit: contain;
    filter:
        drop-shadow(0 34px 65px rgba(0, 0, 0, 0.7))
        drop-shadow(0 0 35px rgba(0, 120, 255, 0.19));
}

.login-visual__name {
    position: relative;
    z-index: 2;
    width: 315px;
    height: auto;
    margin-top: 18px;
    object-fit: contain;
}

.login-visual p {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 23px 0 0;
    color: #78879b;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.28em;
}

.login-visual p i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--login-blue);
    box-shadow: 0 0 11px rgba(22, 136, 255, 0.85);
}

/* Правая часть */

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background:
        linear-gradient(
            145deg,
            rgba(10, 23, 39, 0.87),
            rgba(5, 13, 23, 0.91)
        );
}

.login-panel__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 45px;
}

.login-panel__brand img:first-child {
    width: 32px;
    height: 42px;
    object-fit: contain;
}

.login-panel__brand img:last-child {
    width: 150px;
    height: auto;
    object-fit: contain;
}

.login-panel__heading > span {
    display: block;
    margin-bottom: 13px;
    color: #3d91eb;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.login-panel__heading h1 {
    margin: 0;
    color: #f3f7fc;
    font-size: 39px;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.login-panel__heading p {
    margin: 12px 0 0;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.5;
}

.login-alert {
    display: grid;
    min-height: 52px;
    grid-template-columns: 27px 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 93, 111, 0.25);
    border-radius: 11px;
    background: rgba(255, 64, 85, 0.07);
    color: #ff9aa5;
    font-size: 12px;
    line-height: 1.45;
}

.login-alert span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 91, 109, 0.12);
    color: var(--login-error);
    font-size: 11px;
    font-weight: 800;
}

.login-form {
    margin-top: 31px;
}

.login-field + .login-field {
    margin-top: 19px;
}

.login-field label {
    display: block;
    margin-bottom: 9px;
    color: #a8b3c1;
    font-size: 11px;
    font-weight: 600;
}

.login-field__control {
    position: relative;
}

.login-field__control > span {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 16px;
    color: #487aa9;
    font-size: 12px;
    transform: translateY(-50%);
    pointer-events: none;
}

.login-field__control input {
    width: 100%;
    height: 54px;
    padding: 0 17px 0 44px;
    outline: none;
    border: 1px solid rgba(128, 160, 198, 0.15);
    border-radius: 11px;
    background: rgba(3, 10, 18, 0.66);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    color: #f1f5fa;
    font: inherit;
    font-size: 13px;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.login-field__control input::placeholder {
    color: #4e5d70;
}

.login-field__control input:hover {
    border-color: rgba(67, 144, 236, 0.29);
}

.login-field__control input:focus {
    border-color: rgba(58, 153, 255, 0.74);
    background: rgba(5, 16, 28, 0.88);
    box-shadow:
        0 0 0 3px rgba(25, 128, 245, 0.11),
        0 0 25px rgba(0, 105, 230, 0.08);
}

.login-submit {
    display: flex;
    width: 100%;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 27px;
    cursor: pointer;
    border: 1px solid rgba(87, 173, 255, 0.54);
    border-radius: 11px;
    background:
        linear-gradient(180deg, #288fff 0%, #1063cb 100%);
    box-shadow:
        0 16px 38px rgba(0, 91, 210, 0.27),
        inset 0 1px 0 rgba(255, 255, 255, 0.21);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 20px 45px rgba(0, 91, 210, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit i {
    font-style: normal;
    font-size: 16px;
}

.login-footer {
    margin: 24px 0 0;
    color: #68778a;
    text-align: center;
    font-size: 12px;
}

.login-footer a {
    color: #55a8ff;
    text-decoration: none;
    font-weight: 700;
}

.login-footer a:hover {
    color: #8bc5ff;
}

/* Адаптация */

@media (max-width: 900px) {
    .login-page {
        padding: 30px;
    }

    .login-shell {
        width: min(100%, 570px);
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 610px;
    }
}

@media (max-width: 560px) {
    .login-page {
        display: block;
        min-height: 100svh;
        padding: 82px 14px 25px;
    }

    .login-back {
        top: 25px;
        left: 20px;
    }

    .login-shell {
        min-height: 0;
        border-radius: 20px;
    }

    .login-panel {
        min-height: 0;
        padding: 35px 23px;
    }

    .login-panel__brand {
        margin-bottom: 34px;
    }

    .login-panel__heading h1 {
        font-size: 34px;
    }
}

/* Login language switcher */

.login-page {
    position: relative;
}

.login-language-switcher {
    position: absolute;
    z-index: 30;
    top: 28px;
    right: 32px;

    display: flex;
    align-items: center;
    gap: 9px;

    height: 32px;
    padding: 0 11px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.025);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-language-switcher a {
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .08em;

    color: rgba(255, 255, 255, .38);
    text-decoration: none;

    transition:
        color 180ms ease,
        text-shadow 180ms ease;
}

.login-language-switcher a:hover {
    color: rgba(255, 255, 255, .82);
}

.login-language-switcher a.is-active {
    color: #fff;
    text-shadow: 0 0 14px rgba(22, 136, 255, .55);
}

.login-language-switcher span {
    width: 2px;
    height: 2px;
    flex: 0 0 2px;

    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
}

@media (max-width: 760px) {
    .login-language-switcher {
        top: 20px;
        right: 16px;
        gap: 7px;
        height: 29px;
        padding: 0 9px;
    }

    .login-language-switcher a {
        font-size: 9px;
    }
}

/* ===== Arabic / RTL ===== */
html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="password"] {
    direction: ltr;
    text-align: left;
}

