:root {
    --login-blue: #1677ff;
    --login-blue-dark: #075dcc;
    --login-navy: #132238;
    --login-text: #17243a;
    --login-muted: #748297;
    --login-border: #dce4ee;
    --login-bg: #f5f8fc;
}

* {
    box-sizing: border-box;
}

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

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

    background: var(--login-bg);
}


/* =========================================================
   PAGE
   ========================================================= */

.enigma-login-light {
    min-height: 100vh;

    display: grid;
    grid-template-columns:
        minmax(600px, 1.18fr)
        minmax(460px, .82fr);

    background:
        linear-gradient(
            135deg,
            #eef5ff 0%,
            #f7faff 45%,
            #f4f7fb 100%
        );
}


/* =========================================================
   HERO
   ========================================================= */

.login-hero {
    position: relative;
    overflow: hidden;

    min-height: 100vh;

    border-right: 1px solid rgba(65, 102, 150, .12);
}

.login-hero::before {
    content: "";

    position: absolute;
    width: 700px;
    height: 700px;

    left: -260px;
    top: -250px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(67, 139, 235, .17),
            rgba(67, 139, 235, 0) 68%
        );
}

.login-hero::after {
    content: "";

    position: absolute;
    width: 520px;
    height: 520px;

    right: -190px;
    bottom: -230px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(49, 116, 213, .13),
            rgba(49, 116, 213, 0) 70%
        );
}

.login-hero-inner {
    position: relative;
    z-index: 2;

    min-height: 100vh;

    padding: 52px 7% 44px;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   LOGO
   ========================================================= */

.login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-logo img {
    width: 52px;
    height: 52px;

    object-fit: contain;
}

.login-logo-name {
    color: #17243a;

    font-size: 23px;
    line-height: 1;

    font-weight: 800;
    letter-spacing: .12em;
}

.login-logo-company {
    margin-top: 7px;

    color: #748399;

    font-size: 10px;

    font-weight: 650;
    letter-spacing: .16em;
}


/* =========================================================
   COPY
   ========================================================= */

.login-hero-content {
    width: min(640px, 88%);

    margin-top: clamp(70px, 10vh, 145px);
}

.login-hero-label {
    margin-bottom: 18px;

    color: var(--login-blue);

    font-size: 11px;

    font-weight: 750;
    letter-spacing: .18em;
}

.login-hero h1 {
    margin: 0;

    color: #16253b;

    font-size: clamp(42px, 4.4vw, 70px);
    line-height: .98;

    font-weight: 750;
    letter-spacing: -.045em;
}

.login-hero-content > p {
    max-width: 540px;

    margin: 26px 0 0;

    color: #718096;

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   FEATURES
   ========================================================= */

.login-features {
    margin-top: 34px;

    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-features > div {
    min-width: 110px;
    height: 40px;

    padding: 0 14px;

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

    border: 1px solid rgba(48, 100, 169, .13);
    border-radius: 10px;

    background: rgba(255,255,255,.62);

    color: #53667e;

    backdrop-filter: blur(8px);

    font-size: 11px;
    font-weight: 650;
}

.login-features i {
    color: var(--login-blue);

    font-size: 14px;
}


/* =========================================================
   PRODUCT VISUAL
   ========================================================= */

.login-products {
    position: relative;

    width: min(620px, 92%);
    height: 250px;

    margin-top: auto;
}

.login-products::before {
    content: "";

    position: absolute;

    left: 3%;
    right: 3%;
    bottom: 9px;

    height: 26px;

    border-radius: 50%;

    background:
        rgba(32, 52, 78, .12);

    filter: blur(15px);
}

.login-envelope {
    position: absolute;

    left: 25px;
    bottom: 24px;

    width: 220px;
    height: 137px;

    border-radius: 6px;

    background:
        linear-gradient(
            145deg,
            #fffefb,
            #e8edf2
        );

    box-shadow:
        0 24px 45px rgba(28, 47, 72, .15);

    transform: rotate(-6deg);
}

.login-envelope::before {
    content: "";

    position: absolute;
    inset: 0;

    clip-path:
        polygon(
            0 0,
            50% 59%,
            100% 0
        );

    background: #e6ebf0;
}

.login-envelope::after {
    content: "";

    position: absolute;
    inset: 0;

    clip-path:
        polygon(
            0 100%,
            50% 43%,
            100% 100%
        );

    background: rgba(255,255,255,.68);
}

.login-envelope-line {
    position: absolute;

    left: 24px;
    bottom: 25px;

    width: 60px;
    height: 3px;

    border-radius: 4px;

    background: #9db3ca;

    z-index: 2;
}

.login-card {
    position: absolute;

    left: 190px;
    bottom: 35px;

    width: 132px;
    height: 176px;

    border-radius: 8px;

    background:
        linear-gradient(
            145deg,
            #ffc966,
            #e98d39
        );

    box-shadow:
        0 28px 48px rgba(38, 56, 78, .17);

    transform: rotate(4deg);
}

.login-card span {
    position: absolute;

    left: 18px;
    bottom: 17px;

    color: rgba(255,255,255,.88);

    font-size: 24px;
    font-weight: 850;
    letter-spacing: .08em;
}

.login-bag {
    position: absolute;

    border-radius: 5px;

    box-shadow:
        0 28px 55px rgba(23, 45, 75, .2);
}

.login-bag::before {
    content: "";

    position: absolute;

    left: 50%;
    top: -20px;

    transform: translateX(-50%);

    width: 70px;
    height: 39px;

    border: 5px solid #c9a465;
    border-bottom: 0;

    border-radius: 45px 45px 0 0;
}

.login-bag span {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 22px;

    text-align: center;

    color: rgba(255,255,255,.86);

    font-size: 10px;

    font-weight: 750;
    letter-spacing: .16em;
}

.login-bag-back {
    right: 30px;
    bottom: 25px;

    width: 165px;
    height: 190px;

    background:
        linear-gradient(
            145deg,
            #2b74c1,
            #184a83
        );

    transform: rotate(5deg);
}

.login-bag-front {
    right: 135px;
    bottom: 15px;

    width: 180px;
    height: 210px;

    background:
        linear-gradient(
            145deg,
            #3886d7,
            #1c589b
        );

    transform: rotate(-3deg);
}

.login-paper-roll {
    position: absolute;

    right: 0;
    bottom: 27px;

    width: 48px;
    height: 170px;

    border-radius: 26px;

    background:
        linear-gradient(
            90deg,
            #b8894c,
            #efd297 48%,
            #ad7c43
        );

    box-shadow:
        0 20px 35px rgba(28, 47, 72, .15);

    transform: rotate(8deg);
}


/* =========================================================
   AUTH
   ========================================================= */

.login-auth {
    min-height: 100vh;

    padding: 40px;

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

.login-auth-card {
    width: 100%;
    max-width: 440px;

    padding: 46px 45px 40px;

    border: 1px solid rgba(102, 126, 157, .15);
    border-radius: 18px;

    background:
        rgba(255,255,255,.83);

    box-shadow:
        0 25px 70px rgba(31, 55, 85, .09);

    backdrop-filter: blur(18px);
}

.login-auth-logo {
    margin-bottom: 24px;

    display: flex;
    justify-content: center;
}

.login-auth-logo img {
    width: 70px;
    height: 70px;
}

.login-auth h2 {
    margin: 0;

    color: #17253a;

    text-align: center;

    font-size: 30px;

    font-weight: 750;
    letter-spacing: -.025em;
}

.login-auth-subtitle {
    margin: 8px 0 32px;

    color: #7a8798;

    text-align: center;

    font-size: 13px;
}


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

.login-light-error {
    margin-bottom: 20px;
    padding: 11px 13px;

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

    border: 1px solid #f2c8cc;
    border-radius: 8px;

    background: #fff1f2;
    color: #b93642;

    font-size: 12px;
}

.login-light-field {
    margin-bottom: 18px;
}

.login-light-field label {
    margin-bottom: 7px;

    display: block;

    color: #45566d;

    font-size: 11px;
    font-weight: 700;
}

.login-light-input {
    position: relative;
}

.login-light-input > i {
    position: absolute;

    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    color: #8292a6;

    font-size: 14px;
}

.login-light-input input {
    width: 100%;
    height: 47px;

    padding: 0 44px 0 41px;

    border: 1px solid var(--login-border);
    border-radius: 8px;

    outline: none;

    background: rgba(255,255,255,.92);
    color: #213149;

    font-size: 13px;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.login-light-input input:focus {
    border-color: #7faef0;

    box-shadow:
        0 0 0 3px rgba(22,119,255,.08);
}

.login-light-input input::placeholder {
    color: #a3afbd;
}

.login-password-toggle {
    position: absolute;

    right: 10px;
    top: 50%;

    width: 30px;
    height: 30px;

    transform: translateY(-50%);

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #8292a6;

    cursor: pointer;
}

.login-light-remember {
    margin: 2px 0 24px;

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

    color: #6f7d90;

    font-size: 11px;

    cursor: pointer;
}

.login-light-remember input {
    width: 16px;
    height: 16px;

    accent-color: var(--login-blue);
}

.login-light-submit {
    width: 100%;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: 0;
    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            #277ce9,
            #1764cf
        );

    color: white;

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

    box-shadow:
        0 10px 24px rgba(22,119,255,.18);

    cursor: pointer;

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.login-light-submit:hover {
    transform: translateY(-1px);

    box-shadow:
        0 13px 28px rgba(22,119,255,.24);
}

.login-light-security {
    margin-top: 27px;
    padding-top: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border-top: 1px solid #e8edf3;

    color: #929dab;

    font-size: 10px;
}

.login-light-security i {
    color: #71869f;
}


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

@media (max-width: 1100px) {

    .enigma-login-light {
        grid-template-columns: 1fr 470px;
    }

    .login-products {
        transform:
            scale(.88);

        transform-origin:
            left bottom;
    }
}

@media (max-width: 900px) {

    .enigma-login-light {
        display: block;
    }

    .login-hero {
        display: none;
    }

    .login-auth {
        min-height: 100vh;

        padding: 24px;
    }

    .login-auth-card {
        max-width: 430px;
    }
}

@media (max-width: 520px) {

    .login-auth {
        align-items: flex-start;

        padding:
            max(24px, env(safe-area-inset-top))
            16px
            24px;
    }

    .login-auth-card {
        margin-top: 8vh;
        padding: 34px 24px 30px;

        border-radius: 14px;
    }

    .login-auth-logo img {
        width: 62px;
        height: 62px;
    }
}

/* =========================================================
   FINAL HERO VISUAL
   ========================================================= */

.login-hero {
    background:
        linear-gradient(
            90deg,
            rgba(244,248,253,.96) 0%,
            rgba(244,248,253,.88) 37%,
            rgba(244,248,253,.34) 63%,
            rgba(244,248,253,.05) 100%
        ),
        url('/assets/imgs/login/hero.jpg');

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

.login-hero::before,
.login-hero::after {
    display: none;
}

.login-hero-inner {
    position: relative;
    z-index: 2;
}

.login-hero-content {
    position: relative;
    z-index: 3;
}

.login-hero-visual {
    flex: 1;
    min-height: 260px;
}

/* Hide old CSS product illustration */
.login-products,
.login-envelope,
.login-card,
.login-bag,
.login-paper-roll {
    display: none !important;
}

/* Stronger readability over photo */
.login-logo,
.login-hero-content {
    text-shadow:
        0 1px 0 rgba(255,255,255,.8);
}

.login-hero h1 {
    max-width: 560px;
}

.login-hero-content > p {
    max-width: 470px;
}

@media (max-width: 1450px) {

    .login-hero {
        background-position: 56% center;
    }
}

@media (max-width: 1150px) {

    .login-hero {
        background-position: 62% center;
    }
}


/* =========================================================
   LOGIN FINAL PROPORTIONS — 70 / 30
   ========================================================= */

.enigma-login-light {
    grid-template-columns: 70% 30% !important;
}

/* Левая часть — яркая картинка без осветления */
.login-hero {
    background:
        url('/assets/imgs/login/hero.jpg')
        center center / cover
        no-repeat !important;
}

/* Убираем все накладки поверх изображения */
.login-hero::before,
.login-hero::after,
.login-hero-inner::before {
    display: none !important;
    content: none !important;
}

/* Убираем дублирующий HTML слева */
.login-hero .login-logo,
.login-hero .login-hero-content,
.login-hero .login-hero-visual {
    display: none !important;
}

.login-hero-inner {
    min-height: 100vh;
    padding: 0 !important;
}

/* Правая часть */
.login-auth {
    padding: 36px 28px !important;

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

/* Форму делаем немного крупнее и увереннее */
.login-auth-card {
    width: 100%;
    max-width: 460px !important;

    padding: 48px 46px 42px !important;

    border-radius: 18px;

    box-shadow:
        0 24px 70px rgba(31, 55, 85, .10);
}

.login-auth-logo img {
    width: 76px !important;
    height: 76px !important;
}

.login-auth h2 {
    font-size: 32px !important;
}

.login-auth-subtitle {
    margin-bottom: 34px !important;
}

/* На средних экранах чуть уменьшаем перекос */
@media (max-width: 1500px) and (min-width: 1101px) {

    .enigma-login-light {
        grid-template-columns: 68% 32% !important;
    }

    .login-auth-card {
        max-width: 430px !important;
        padding: 42px 38px 36px !important;
    }
}

/* На ноутбуках */
@media (max-width: 1100px) and (min-width: 901px) {

    .enigma-login-light {
        grid-template-columns: 64% 36% !important;
    }

    .login-auth {
        padding: 28px 22px !important;
    }

    .login-auth-card {
        max-width: 400px !important;
        padding: 38px 30px 32px !important;
    }
}

/* На мобильных оставляем только авторизацию */
@media (max-width: 900px) {

    .enigma-login-light {
        display: block !important;
    }

    .login-hero {
        display: none !important;
    }

    .login-auth {
        min-height: 100vh;
        padding: 24px !important;
    }

    .login-auth-card {
        max-width: 430px !important;
    }
}


/* =========================================================
   ENIGMA LOGIN — FINAL DESKTOP TUNING
   ========================================================= */

/* Основная пропорция */
.enigma-login-light {
    grid-template-columns: 70% 30% !important;
}

/*
 * Показываем всю фирменную композицию.
 * contain вместо cover — логотип и нижний слоган больше не обрезаются.
 */
.login-hero {
    background-image: url('/assets/imgs/login/hero.jpg') !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center center !important;
    background-color: #f5f9ff !important;
}

/* Никаких фильтров и накладок */
.login-hero::before,
.login-hero::after,
.login-hero-inner::before {
    display: none !important;
    content: none !important;
    background: none !important;
    opacity: 0 !important;
}

.login-hero .login-logo,
.login-hero .login-hero-content,
.login-hero .login-hero-visual {
    display: none !important;
}

.login-hero-inner {
    min-height: 100vh !important;
    padding: 0 !important;
}

/* Правая рабочая зона */
.login-auth {
    min-height: 100vh !important;
    padding: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Увеличиваем настоящую форму */
.login-auth-card {
    width: min(88%, 480px) !important;
    max-width: 480px !important;
    padding: 48px 44px 42px !important;
    border-radius: 20px !important;
    box-shadow:
        0 24px 65px rgba(25, 48, 82, .10),
        0 4px 14px rgba(25, 48, 82, .04) !important;
}

/* Логотип формы */
.login-auth-logo img {
    width: 82px !important;
    height: 82px !important;
}

/* Заголовок */
.login-auth h2 {
    font-size: 30px !important;
    line-height: 1.15 !important;
    margin-top: 14px !important;
}

/* Подзаголовок */
.login-auth-subtitle {
    font-size: 14px !important;
    margin-bottom: 32px !important;
}

/* Поля */
.login-auth-card input {
    min-height: 48px !important;
}

/* Кнопка */
.login-auth-card button[type="submit"] {
    min-height: 50px !important;
}

/* Небольшие экраны */
@media (max-width: 1500px) and (min-width: 1101px) {
    .enigma-login-light {
        grid-template-columns: 68% 32% !important;
    }

    .login-auth-card {
        width: 88% !important;
        max-width: 440px !important;
        padding: 42px 36px 36px !important;
    }
}

/* Ноутбуки */
@media (max-width: 1100px) and (min-width: 901px) {
    .enigma-login-light {
        grid-template-columns: 64% 36% !important;
    }

    .login-auth-card {
        width: 90% !important;
        padding: 36px 30px !important;
    }
}

/* Телефон / планшет */
@media (max-width: 900px) {
    .enigma-login-light {
        display: block !important;
    }

    .login-hero {
        display: none !important;
    }

    .login-auth {
        min-height: 100vh !important;
        padding: 24px !important;
    }

    .login-auth-card {
        width: 100% !important;
        max-width: 430px !important;
    }
}




/* =========================================================
   ENIGMA LOGIN HERO — SINGLE SOURCE OF TRUTH
   ========================================================= */

.login-hero {
    background-image: url('/assets/imgs/login/hero.jpg') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: contain !important;
    background-color: #f2f7fd !important;
}


/* =========================================================
   ENIGMA LOGIN HERO — FINAL 70/30
   ========================================================= */

.enigma-login-light {
    grid-template-columns: 70% 30% !important;
}

.login-hero {
    min-height: 100vh !important;

    background-image:
        url('/assets/imgs/login/hero.jpg') !important;

    background-repeat:
        no-repeat !important;

    background-position:
        center center !important;

    background-size:
        cover !important;

    background-color:
        #eef5fb !important;
}

.login-hero::before,
.login-hero::after,
.login-hero-inner::before {
    display: none !important;
    content: none !important;
}

.login-hero .login-logo,
.login-hero .login-hero-content,
.login-hero .login-hero-visual {
    display: none !important;
}

.login-hero-inner {
    min-height: 100vh !important;
    padding: 0 !important;
}

/* Ноутбук */
@media (max-width: 1500px) and (min-width: 1101px) {
    .enigma-login-light {
        grid-template-columns: 68% 32% !important;
    }
}

/* Небольшой ноутбук / планшет */
@media (max-width: 1100px) and (min-width: 901px) {
    .enigma-login-light {
        grid-template-columns: 64% 36% !important;
    }
}

/* Телефон */
@media (max-width: 900px) {
    .enigma-login-light {
        display: block !important;
    }

    .login-hero {
        display: none !important;
    }
}

