:root {
    --register-bg: #02060c;
    --register-text: #f2f6fb;
    --register-muted: #7f8c9f;
    --register-blue: #1688ff;
    --register-blue-light: #67b7ff;
    --register-error: #ff6675;
}

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

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

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

.register-page::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    opacity: 0.14;
    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: "";
}

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

.register-page__glow--left {
    top: 18%;
    left: 4%;
    width: 520px;
    height: 520px;
    background: rgba(0, 101, 230, 0.11);
}

.register-page__glow--right {
    right: 4%;
    bottom: 7%;
    width: 440px;
    height: 440px;
    background: rgba(0, 72, 165, 0.08);
}

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

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

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

.register-shell {
    display: grid;
    width: min(100%, 1240px);
    max-height: calc(100svh - 68px);
    overflow: hidden;
    grid-template-columns: minmax(0, 0.82fr) minmax(620px, 1.18fr);
    border: 1px solid rgba(91, 158, 246, 0.18);
    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);
}

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

.register-visual {
    position: relative;
    display: flex;
    min-height: 780px;
    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);
}

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

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

.register-visual__rings::before {
    inset: 52px;
}

.register-visual__rings::after {
    inset: 104px;
}

.register-visual__logo {
    position: relative;
    z-index: 2;
    width: 310px;
    max-height: 405px;
    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));
}

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

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

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

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

.register-panel {
    overflow-y: auto;
    padding: 42px 50px 36px;
    background:
        linear-gradient(
            145deg,
            rgba(10, 23, 39, 0.87),
            rgba(5, 13, 23, 0.91)
        );
    scrollbar-width: thin;
    scrollbar-color: rgba(40, 137, 255, 0.4) transparent;
}

.register-panel::-webkit-scrollbar {
    width: 6px;
}

.register-panel::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: rgba(40, 137, 255, 0.35);
}

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

.register-panel__brand img:first-child {
    width: 30px;
    height: 40px;
    object-fit: contain;
}

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

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

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

.register-panel__heading p {
    margin: 10px 0 0;
    color: var(--register-muted);
    font-size: 13px;
    line-height: 1.5;
}

.register-alert {
    display: grid;
    min-height: 50px;
    grid-template-columns: 27px 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    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;
}

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

.register-form {
    margin-top: 24px;
}

.register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 18px;
}

.register-field--full {
    grid-column: 1 / -1;
}

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

.register-field input,
.register-field select {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    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;
}

.register-field select {
    appearance: auto;
    color-scheme: dark;
}

.register-field input::placeholder {
    color: #4e5d70;
}

.register-field input:hover,
.register-field select:hover {
    border-color: rgba(67, 144, 236, 0.29);
}

.register-field input:focus,
.register-field select: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);
}

.register-error {
    margin-top: 7px;
    color: #ff8d99;
    font-size: 10px;
    line-height: 1.4;
}

.register-submit {
    display: flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 23px;
    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;
}

.register-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);
}

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

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

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

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

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

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

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

    .register-shell {
        width: min(100%, 760px);
        max-height: none;
        grid-template-columns: 1fr;
    }

    .register-visual {
        display: none;
    }

    .register-panel {
        max-height: calc(100svh - 60px);
    }
}

@media (max-width: 680px) {
    .register-page {
        display: block;
        min-height: 100svh;
        overflow: visible;
        padding: 78px 14px 24px;
    }

    .register-back {
        top: 24px;
        left: 20px;
    }

    .register-shell {
        overflow: visible;
        border-radius: 20px;
    }

    .register-panel {
        max-height: none;
        overflow: visible;
        padding: 32px 22px;
    }

    .register-panel__brand {
        margin-bottom: 28px;
    }

    .register-panel__heading h1 {
        font-size: 33px;
    }

    .register-grid {
        grid-template-columns: 1fr;
    }

    .register-field--full {
        grid-column: auto;
    }
}

/* Исправление для экранов с небольшой высотой */

.register-page {
    overflow-y: auto;
    align-items: start;
}

.register-shell {
    margin: auto;
    max-height: none;
}

.register-panel {
    overflow-y: visible;
}

/* Невысокие ноутбуки, включая MacBook */
@media (max-height: 900px) and (min-width: 1051px) {
    .register-page {
        display: block;
        padding: 78px 32px 32px;
    }

    .register-shell {
        min-height: 760px;
        margin: 0 auto;
    }

    .register-visual {
        min-height: 760px;
    }

    .register-panel {
        padding-top: 34px;
        padding-bottom: 34px;
    }
}

/* Ещё более низкие окна */
@media (max-height: 780px) and (min-width: 1051px) {
    .register-page {
        padding-top: 68px;
    }

    .register-shell {
        min-height: 700px;
    }

    .register-visual {
        min-height: 700px;
    }

    .register-panel__brand {
        margin-bottom: 20px;
    }

    .register-panel__heading h1 {
        font-size: 32px;
    }

    .register-panel__heading p {
        margin-top: 7px;
    }

    .register-form {
        margin-top: 18px;
    }

    .register-grid {
        gap: 13px 16px;
    }

    .register-field input,
    .register-field select {
        height: 46px;
    }

    .register-submit {
        margin-top: 18px;
    }

    .register-footer {
        margin-top: 15px;
    }
}

/* Register language switcher */

.register-page {
    position: relative;
}

.register-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);
}

.register-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;
}

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

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

.register-language-switcher span {
    width: 2px;
    height: 2px;
    flex: 0 0 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
}

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

    .register-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;
}

