:root {
    --login-white: #f8fbff;
    --login-muted: #a9b8d3;
    --login-soft: rgba(220, 233, 255, 0.72);
    --login-cyan: #16d9ff;
    --login-blue: #3488ff;
    --login-violet: #8d3cff;
    --login-border: rgba(120, 195, 255, 0.34);
    --login-field: rgba(9, 30, 56, 0.58);
    --login-card: rgba(8, 28, 52, 0.72);
}

body.has-no-topbar {
    min-height: 100vh;
    background: #030b18;
}

body.has-no-topbar .app-main {
    min-height: 100vh;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 520px);
    align-items: center;
    gap: clamp(48px, 8vw, 140px);
    padding: clamp(42px, 7vw, 112px) clamp(38px, 8vw, 138px);
    overflow: hidden;
    color: var(--login-white);
    isolation: isolate;
    background:
            linear-gradient(90deg, rgba(3, 9, 23, 0.12), rgba(3, 9, 23, 0.06)),
            url("../../../core/images/login/background.png") center / cover no-repeat;
}

.login-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
            radial-gradient(circle at 78% 52%, rgba(12, 201, 255, 0.18), transparent 340px),
            radial-gradient(circle at 14% 8%, rgba(130, 60, 255, 0.16), transparent 380px),
            linear-gradient(90deg, rgba(1, 7, 18, 0.20), rgba(1, 7, 18, 0.02));
}

.login-copy {
    max-width: 650px;
    align-self: center;
    animation: loginFadeUp 520ms ease both;
}

.login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    color: var(--login-cyan);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(22, 217, 255, 0.48);
}

.login-kicker-icon {
    width: 27px;
    height: 27px;
    display: inline-grid;
    place-items: center;
    color: #7b5cff;
    font-size: 24px;
    line-height: 1;
    text-shadow: 0 0 18px rgba(124, 92, 255, 0.85);
}

.login-copy h1 {
    margin: 0 0 22px;
    color: #ffffff;
    font-size: clamp(74px, 8vw, 118px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.08em;
    text-shadow:
            0 0 22px rgba(79, 137, 255, 0.52),
            0 12px 42px rgba(0, 0, 0, 0.38);
}

.login-copy h1::first-letter {
    letter-spacing: -0.1em;
}

.login-copy p {
    margin: 0;
    color: var(--login-soft);
    font-size: clamp(23px, 2vw, 32px);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 1.3;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    justify-self: end;
    margin: 0;
    padding: clamp(34px, 3.8vw, 56px);
    overflow: hidden;
    border: 1px solid var(--login-border);
    border-radius: 36px;
    background:
            radial-gradient(circle at 96% 12%, rgba(11, 191, 255, 0.18), transparent 210px),
            linear-gradient(180deg, rgba(31, 78, 120, 0.34), rgba(7, 24, 47, 0.72)),
            var(--login-card);
    box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.16),
            0 0 0 1px rgba(39, 139, 202, 0.16),
            0 34px 95px rgba(0, 0, 0, 0.46),
            0 0 72px rgba(0, 217, 255, 0.13);
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
    animation: loginFadeUp 520ms ease 90ms both;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 1px;
    pointer-events: none;
    border-radius: 35px;
    background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.10), transparent 36%),
            radial-gradient(circle at 10% 100%, rgba(141, 60, 255, 0.20), transparent 210px);
}

.login-card > * {
    position: relative;
    z-index: 1;
}

.login-card-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    border: 1px solid rgba(126, 182, 255, 0.24);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    color: #7c63ff;
    font-size: 44px;
    line-height: 1;
    text-shadow: 0 0 22px rgba(22, 217, 255, 0.45);
}

.login-card h2 {
    margin: 0 0 30px;
    color: #ffffff;
    font-size: clamp(34px, 3.2vw, 44px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.055em;
    text-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
}

.form-field {
    position: relative;
    margin-bottom: 24px;
}

.form-field label {
    display: block;
    margin: 0 0 10px;
    color: #edf5ff;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -0.015em;
}

.form-field.has-icon .field-icon {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: rgba(226, 239, 255, 0.86);
    font-size: 17px;
    line-height: 1;
}

.form-field input {
    width: 100%;
    height: 58px;
    padding: 0 18px;
    border: 1px solid rgba(164, 202, 255, 0.26);
    border-radius: 12px;
    outline: none;
    background: var(--login-field);
    color: #ffffff;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.018em;
    box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.07),
            0 10px 28px rgba(0, 0, 0, 0.16);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.form-field.has-icon input {
    padding-left: 56px;
}

.form-field input::placeholder {
    color: rgba(166, 182, 207, 0.70);
}

.form-field input:hover {
    border-color: rgba(164, 202, 255, 0.40);
    background: rgba(12, 38, 70, 0.66);
}

.form-field input:focus {
    border-color: rgba(22, 217, 255, 0.72);
    background: rgba(13, 43, 79, 0.72);
    box-shadow:
            0 0 0 4px rgba(22, 217, 255, 0.10),
            0 17px 38px rgba(0, 0, 0, 0.22);
}

.login-card .btn,
.btn {
    width: 100%;
    min-height: 64px;
    margin-top: 10px;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    background: linear-gradient(100deg, var(--login-violet) 0%, #587bff 48%, var(--login-cyan) 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.025em;
    box-shadow:
            0 20px 48px rgba(42, 175, 255, 0.22),
            0 18px 42px rgba(141, 60, 255, 0.27),
            inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition: transform 170ms ease, filter 170ms ease, box-shadow 170ms ease;
}

.login-card .btn:hover,
.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow:
            0 28px 62px rgba(42, 175, 255, 0.25),
            0 20px 54px rgba(141, 60, 255, 0.32),
            inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.login-card .btn:active,
.btn:active {
    transform: translateY(0) scale(0.99);
}

.form-link {
    display: flex;
    justify-content: center;
    margin: 22px 0 0;
    color: var(--login-cyan);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    letter-spacing: -0.018em;
    text-shadow: 0 0 14px rgba(22, 217, 255, 0.28);
}

.form-link:hover {
    color: #8bf0ff;
}

.form-link::after {
    content: none;
}

.login-card-footer {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(163, 201, 255, 0.13);
    color: rgba(215, 224, 240, 0.78);
    font-size: 14px;
    font-weight: 650;
    text-align: center;
    letter-spacing: -0.018em;
}

.login-card-footer span {
    color: var(--login-cyan);
    font-weight: 850;
}

.alert {
    padding: 13px 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 750;
}

.alert-danger {
    color: #ffe1e8;
    background: rgba(255, 77, 109, 0.14);
    border-color: rgba(255, 77, 109, 0.34);
}

.alert-info {
    color: #d9fff4;
    background: rgba(22, 217, 255, 0.11);
    border-color: rgba(22, 217, 255, 0.26);
}

.form-field input:-webkit-autofill,
.form-field input:-webkit-autofill:hover,
.form-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    box-shadow: 0 0 0 1000px rgba(13, 43, 79, 0.92) inset;
    transition: background-color 9999s ease-in-out 0s;
}

@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1100px) {
    .login-shell,
    .login-shell.compact {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 40px 22px;
        background-position: 28% center;
    }

    .login-copy {
        max-width: 560px;
        margin: 0 auto;
        text-align: center;
    }

    .login-kicker {
        justify-content: center;
        margin-bottom: 20px;
    }

    .login-copy h1 {
        font-size: clamp(56px, 13vw, 88px);
    }

    .login-copy p {
        font-size: clamp(18px, 4vw, 24px);
    }

    .login-card {
        justify-self: center;
        max-width: 500px;
    }
}

@media (max-width: 540px) {
    .login-shell,
    .login-shell.compact {
        padding: 28px 14px;
    }

    .login-kicker {
        gap: 10px;
        font-size: 11px;
        letter-spacing: 0.24em;
    }

    .login-copy h1 {
        font-size: clamp(48px, 18vw, 66px);
    }

    .login-card {
        padding: 26px 20px;
        border-radius: 26px;
    }

    .login-card h2 {
        font-size: 30px;
    }

    .login-card-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 20px;
        font-size: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
