@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@600&display=swap");

@font-face {
    font-family: "ALS Sirius VF";
    src: url("../fonts/als_sirius_vf.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}

body[theme="light"] {
    --auth-bg: #ffffff;
    --auth-text-100: #11142d;
    --auth-text-80: #5e5f70;
    --auth-text-60: #808191;
    --auth-text-30: #b8b9c1;
    --auth-ui-30: #f8f8f8;
    --auth-ui-30-hover: #f1f1f1;
    --auth-ui-100: #f1f1f1;
    --auth-ui-200: #e4e4e4;
    --auth-ui-300: #b8b9c1;
    --auth-danger: #d93a3a;
    --auth-success: #2e9e5b;

    --auth-panel-bg: #f5f5f5;
    --auth-panel-glow: rgba(237, 128, 13, 0.75), rgba(239, 138, 34, 0.6875) 8.75%, rgba(241, 148, 55, 0.625) 17.5%, rgba(245, 168, 97, 0.5) 35%, rgba(252, 224, 199, 0.25) 70%, rgba(255, 250, 245, 0);
    --auth-panel-purple: rgba(167, 0, 179, 0.22);
    --auth-panel-glow-size: max(396.8px, 62cqw) max(364.56px, 56.96cqw);
    --auth-hero-glow-size: max(274.5px, 70.38cqw) max(143.04px, 36.68cqw);
    --auth-hero-bg: #fffbf7;

    --auth-core-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.75) 100%);
    --auth-core-border: rgba(255, 255, 255, 0.5);
    --auth-core-shadow: 0 16px 40px 0 rgba(153, 64, 0, 0.18);
    --auth-glass-bg: rgba(255, 255, 255, 0.6);
    --auth-glass-border: #ffffff;

    --auth-contours-opacity: 0.3;
    --auth-contours-opacity-mobile: 0.3;
    --auth-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .12 0 0 0 0 .05 1 0 0 0 .01'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 .06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23n)'/%3E%3C/svg%3E");
}

body[theme="dark"] {
    --auth-bg: #1f2128;
    --auth-text-100: #ffffff;
    --auth-text-80: #aeafbd;
    --auth-text-60: #9d9eaf;
    --auth-text-30: #6b6c79;
    --auth-ui-30: #292c35;
    --auth-ui-30-hover: #30333d;
    --auth-ui-100: #3a3d47;
    --auth-ui-200: #434651;
    --auth-ui-300: #6b6c79;
    --auth-danger: #ef5b5b;
    --auth-success: #4cc27e;

    --auth-panel-bg: linear-gradient(180deg, #281e2b 0%, #1e1d23 100%);
    --auth-panel-glow: rgba(237, 128, 13, 0.6), rgba(217, 107, 31, 0.3) 30.77%, rgba(162, 75, 15, 0.1) 66.83%, rgba(92, 52, 11, 0);
    --auth-panel-purple: rgba(100, 0, 117, 0.45);
    --auth-panel-glow-size: max(359.5px, 56.17cqw) max(341.3px, 53.33cqw);
    --auth-hero-glow-size: max(269.5px, 69.1cqw) max(145.12px, 37.21cqw);
    --auth-hero-bg: linear-gradient(180deg, #281e2b 0%, #1e1d23 100%);

    --auth-core-bg: rgba(255, 255, 255, 0.1);
    --auth-core-border: rgba(255, 255, 255, 0.22);
    --auth-core-shadow: 0 12px 48px 0 rgba(237, 128, 13, 0.35);
    --auth-glass-bg: rgba(255, 255, 255, 0.02);
    --auth-glass-border: rgba(255, 255, 255, 0.1);

    --auth-contours-opacity: 0.07;
    --auth-contours-opacity-mobile: 0.07;
    --auth-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 .06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23n)'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: var(--auth-bg);
    color: var(--auth-text-100);
    font-family: "ALS Sirius VF", "Inter", sans-serif;
    font-size: 14px;
    line-height: normal;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.d-none {
    display: none !important;
}

/* ---------- Layout ---------- */

.auth-page {
    display: flex;
    min-height: 100vh;
    padding: 16px 0 16px 16px;
}

.auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: 380px;
}

/* ---------- Promo panel (desktop) ---------- */

.auth-panel {
    position: relative;
    container-type: inline-size;
    flex: 0 0 50%;
    min-height: 680px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--auth-panel-bg);
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        var(--auth-noise),
        radial-gradient(max(320px, 50cqw) max(277.76px, 43.4cqw) at 98% 17.36px, var(--auth-panel-purple), transparent),
        radial-gradient(var(--auth-panel-glow-size) at 50% 260.4px, var(--auth-panel-glow));
    pointer-events: none;
}

.auth-panel__contours {
    position: absolute;
    top: 0;
    left: 50%;
    width: 929px;
    height: 868px;
    transform: translateX(-50%);
    background: url("../images/auth/contours-desktop.svg") center / 100% 100% no-repeat;
    opacity: var(--auth-contours-opacity);
    pointer-events: none;
}

.auth-logo {
    position: absolute;
    top: 36px;
    left: 40px;
    width: 107px;
    height: 49.865px;
}

.auth-logo span {
    position: absolute;
}

.auth-logo__veles,
.auth-logo__finance,
.auth-social__icon,
.auth-input__eye {
    -webkit-mask: var(--auth-icon) center / 100% 100% no-repeat;
    mask: var(--auth-icon) center / 100% 100% no-repeat;
}

.auth-logo__symbol {
    top: 0;
    left: 0;
    width: 39.6637px;
    height: 45.5461px;
    background: url("../images/auth/logo-symbol.svg") center / 100% 100% no-repeat;
}

.auth-logo__veles {
    top: 15.024px;
    left: 36.466px;
    width: 70.5336px;
    height: 25.3198px;
    --auth-icon: url("../images/auth/logo-veles.svg");
    background-color: var(--auth-text-100);
}

.auth-logo__finance {
    top: 43.702px;
    left: 67.175px;
    width: 39.8252px;
    height: 6.16392px;
    --auth-icon: url("../images/auth/logo-finance.svg");
    background-color: var(--auth-text-60);
}

.auth-core {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--auth-core-border);
    border-radius: 50%;
    background: var(--auth-core-bg);
    box-shadow: var(--auth-core-shadow);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.auth-core__mark {
    background: url("../images/auth/mark.svg") center / 100% 100% no-repeat;
}

.auth-panel .auth-core {
    top: 206px;
    left: calc(50% - 56px);
    width: 112px;
    height: 112px;
}

.auth-panel .auth-core__mark {
    width: 45.2841px;
    height: 52px;
}

.auth-panel__content {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 46px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.auth-panel__title {
    margin: 0 0 12px;
    font-size: clamp(28px, 2.78vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--auth-text-100);
}

.auth-panel__subtitle {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    color: var(--auth-text-60);
}

.auth-stats {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border: 1px solid var(--auth-glass-border);
    border-radius: 20px;
    background: var(--auth-glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.auth-stats__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}

.auth-stats__value {
    font-size: clamp(24px, 2.22vw, 32px);
    font-weight: 700;
    color: var(--auth-text-100);
}

.auth-stats__label {
    font-size: 12px;
    color: var(--auth-text-60);
}

.auth-stats__divider {
    flex: 0 0 1px;
    height: 40px;
    background: var(--auth-ui-200);
}

/* ---------- Hero (mobile) ---------- */

.auth-hero {
    display: none;
}

/* ---------- Form ---------- */

.auth__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.auth__title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--auth-text-100);
}

.auth__subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--auth-text-60);
}

.auth__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0;
}

.auth__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.auth-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: var(--auth-ui-30);
    color: var(--auth-text-100);
    font: inherit;
    font-size: 14px;
    font-weight: 550;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.auth-social:hover {
    background: var(--auth-ui-30-hover);
}

.auth-social__icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background-color: currentColor;
}

.auth-social__icon--google {
    --auth-icon: url("../images/icons/gmail.svg");
}

.auth-social__icon--telegram {
    --auth-icon: url("../images/icons/telegram-2.svg");
    -webkit-mask-size: 15.2px 12.8px;
    mask-size: 15.2px 12.8px;
    -webkit-mask-position: left center;
    mask-position: left center;
}

.auth-or {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 12px;
    color: var(--auth-text-30);
}

.auth-or::before,
.auth-or::after {
    content: "";
    flex: 1 1 0;
    height: 1px;
    background: var(--auth-ui-100);
}

.auth-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field__label {
    font-size: 12px;
    font-weight: 550;
    color: var(--auth-text-80);
}

.auth-input {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 14px 0 16px;
    border: 1px solid var(--auth-ui-200);
    border-radius: 12px;
    background: var(--auth-bg);
    transition: border-color 0.15s ease;
}

.auth-input:focus-within {
    border-color: #ed800d;
    box-shadow: 0 0 0 0.5px #ed800d;
}

.auth-input input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--auth-text-100);
    font: inherit;
    font-size: 14px;
}

.auth-input input::placeholder {
    color: var(--auth-text-30);
    opacity: 1;
}

.auth-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--auth-text-100);
    -webkit-box-shadow: 0 0 0 100px var(--auth-bg) inset;
    transition: background-color 9999s;
}

.auth-input input[readonly] {
    color: var(--auth-text-60);
}

.auth-input__eye {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    --auth-icon: url("../images/icons/i18/eye2.svg");
    background-color: var(--auth-text-100);
    cursor: pointer;
}

/* Пароль показан — открытый глаз */
.auth-input:not(.hidden) .auth-input__eye {
    --auth-icon: url("../images/icons/i18/eye1.svg");
}

.auth-field:has(.email-error, .password-error) .auth-input {
    border-color: var(--auth-danger);
}

.email-error,
.password-error,
.captcha-error {
    display: block;
    font-size: 12px;
    line-height: 16px;
    color: var(--auth-danger);
}

.auth-messages {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    line-height: 16px;
}

.auth-messages:not(:has(*)) {
    display: none;
}

.false_credentials {
    color: var(--auth-danger);
}

.logout_success {
    color: var(--auth-success);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--auth-text-80);
    cursor: pointer;
    user-select: none;
}

.auth-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-checkbox__box {
    position: relative;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--auth-ui-300);
    border-radius: 4px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.auth-checkbox input:checked + .auth-checkbox__box {
    border-color: #ed800d;
    background: #ed800d;
}

.auth-checkbox input:checked + .auth-checkbox__box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.auth-checkbox input:focus-visible + .auth-checkbox__box {
    outline: 2px solid #ed800d;
    outline-offset: 2px;
}

.auth-link-muted {
    font-size: 12px;
    font-weight: 550;
    color: var(--auth-text-60);
}

.auth-link-muted:hover {
    color: var(--auth-text-100);
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    border: 0;
    border-radius: 12px;
    background: #ed800d;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0.4px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.auth-button:hover {
    background: #de7200;
}

.auth-button:disabled {
    cursor: default;
}

.auth-agreement {
    margin: 0;
    font-size: 12px;
    text-align: center;
    color: var(--auth-text-60);
}

.auth-agreement a {
    font-weight: 700;
    color: var(--auth-text-80);
}

.auth-switch {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--auth-text-60);
}

.auth-switch a {
    font-weight: 550;
    color: var(--auth-text-100);
}

.auth-switch a:hover {
    color: #ed800d;
}

#captcha {
    display: flex;
    justify-content: center;
}

/* ---------- Loader ---------- */

.lds-ring {
    display: none;
}

.auth-button.loading > :not(.lds-ring) {
    display: none;
}

.auth-button.loading .lds-ring {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 24px;
}

.auth-button.loading .lds-ring div {
    position: absolute;
    inset: 0;
    border: 3px solid;
    border-radius: 50%;
    border-color: #ffffff transparent transparent transparent;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.auth-button.loading .lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.auth-button.loading .lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}

.auth-button.loading .lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 1023px) {
    .auth-page {
        position: relative;
        display: block;
        padding: 0;
        overflow: hidden;
    }

    .auth-panel {
        display: none;
    }

    .auth-hero {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 290px;
        overflow: hidden;
        container-type: inline-size;
        background: var(--auth-hero-bg);
        pointer-events: none;
    }

    .auth-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            var(--auth-noise),
            radial-gradient(max(195px, 50cqw) max(96px, 24.62cqw) at 98% -4px, var(--auth-panel-purple), transparent),
            radial-gradient(var(--auth-hero-glow-size) at 50% 80px, var(--auth-panel-glow));
    }

    .auth-hero__contours {
        position: absolute;
        top: -45px;
        left: 50%;
        width: 575.98px;
        height: 538.16px;
        transform: translateX(-50%);
        background: url("../images/auth/contours-mobile.svg") center / 100% 100% no-repeat;
        opacity: var(--auth-contours-opacity-mobile);
    }

    .auth-hero__fade {
        position: absolute;
        left: 0;
        right: 0;
        top: 150px;
        height: 140px;
        background: linear-gradient(180deg, transparent 0%, var(--auth-bg) 100%);
    }

    .auth-hero .auth-core {
        top: 74px;
        left: calc(50% - 36px);
        width: 72px;
        height: 72px;
        border-width: 0.643px;
    }

    .auth-hero .auth-core__mark {
        width: 29.1119px;
        height: 33.4272px;
    }

    .auth-main {
        position: relative;
        display: block;
        padding: 190px 16px 32px;
    }

    .auth {
        margin: 0 auto;
    }

    .auth__title {
        font-size: 28px;
    }

    .auth-input input {
        font-size: 16px;
    }
}
