* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    --login-primary: #00a6fb;
    --login-primary-soft: rgba(0, 166, 251, 0.18);
    --login-border: rgba(255, 255, 255, 0.16);
    --login-surface: rgba(8, 18, 39, 0.82);
    --login-surface-strong: rgba(12, 26, 54, 0.9);
    --login-text: #f7fbff;
    --login-muted: rgba(226, 236, 246, 0.72);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    font-family: 'Manrope', sans-serif;
    color: var(--login-text);
    background:
        radial-gradient(circle at top left, rgba(0, 166, 251, 0.24), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255, 183, 3, 0.18), transparent 26%),
        linear-gradient(145deg, #04111f 0%, #09172e 45%, #050b14 100%);
    overflow: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
}

body::before {
    top: -120px;
    left: -80px;
    background: rgba(0, 166, 251, 0.24);
}

body::after {
    right: -80px;
    bottom: -140px;
    background: rgba(255, 183, 3, 0.14);
}

.container {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    border: 1px solid var(--login-border);
    border-radius: 36px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(8, 18, 39, 0.92), rgba(9, 25, 54, 0.8));
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(24px);
}

.login-noise {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.16;
    pointer-events: none;
}

.container .form-box {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.form-box.Login {
    padding: 52px 44px 44px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    z-index: 2;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.login-brand__mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(0, 166, 251, 0.18), rgba(255, 183, 3, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-brand__mark img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.login-brand__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--login-muted);
    margin-bottom: 4px;
}

.login-brand strong,
.form-box h2 {
    font-family: 'Space Grotesk', sans-serif;
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
}

.login-header__title {
    min-width: 0;
}

.form-box h2 {
    font-size: clamp(2.1rem, 4vw, 3.15rem);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--login-muted);
    max-width: 320px;
    line-height: 1.65;
}

.form-box.Login .animation {
    transform: translateX(0%);
    transition: .7s;
    opacity: 1;
    transition-delay: calc(.1s * var(--S));
}

.container.active .form-box.Login .animation {
    transform: translateX(-120%);
    opacity: 0;
    transition-delay: calc(.1s * var(--D));
}

.form-box .input-box {
    position: relative;
    width: 100%;
    min-height: 62px;
    margin-top: 28px;
}

.input-box input {
    width: 100%;
    min-height: 62px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.14);
    outline: none;
    font-size: 1rem;
    color: var(--login-text);
    font-weight: 600;
    border-radius: 18px;
    padding: 20px 52px 14px 18px;
    transition: .35s ease;
}

.input-box input:focus,
.input-box input:valid {
    border-color: rgba(0, 166, 251, 0.65);
    box-shadow: 0 0 0 4px rgba(0, 166, 251, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.input-box label {
    position: absolute;
    top: 20px;
    left: 18px;
    font-size: 0.96rem;
    color: var(--login-muted);
    pointer-events: none;
    transition: .3s ease;
}

.input-box input:focus ~ label,
.input-box input:valid ~ label {
    top: 10px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--login-primary);
}

.input-box box-icon {
    position: absolute;
    top: 18px;
    right: 16px;
    transform: translateY(0);
    opacity: 0.9;
}

.btn {
    position: relative;
    width: 100%;
    min-height: 58px;
    background: linear-gradient(135deg, #0098ea, #00a6fb 48%, #13b8ff);
    border-radius: 18px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: #03101d;
    border: none;
    overflow: hidden;
    box-shadow: 0 22px 38px rgba(0, 166, 251, 0.28);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.5) 48%, transparent 82%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 50px rgba(0, 166, 251, 0.34);
    filter: brightness(1.04);
}

.btn:hover::before {
    transform: translateX(120%);
}

.login-lottie {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

#login-lottie {
    width: 92px;
    height: 92px;
    border-radius: 22px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 70%);
}

.flash-messages {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(90vw, 560px);
    display: grid;
    gap: 12px;
    z-index: 10;
}

.flash {
    background: rgba(8, 18, 39, 0.88);
    border: 1px solid rgba(0, 166, 251, 0.38);
    border-radius: 18px;
    padding: 14px 18px;
    font-size: 0.95rem;
    color: var(--login-text);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(18px);
}

.flash-success {
    border-color: rgba(111, 182, 132, 0.65);
}

.flash-warning {
    border-color: rgba(255, 183, 3, 0.75);
}

.flash-danger {
    border-color: rgba(255, 107, 107, 0.7);
}

@media (max-width: 980px) {
    body {
        padding: 20px;
    }

    .container {
        width: min(560px, 100%);
    }

    .form-box.Login {
        padding: 40px 32px 32px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 14px;
    }

    .container {
        border-radius: 24px;
    }

    .form-box.Login {
        padding: 30px 22px 24px;
    }

    .form-box h2 {
        font-size: 2rem;
    }

    .login-header {
        align-items: flex-start;
        gap: 12px;
    }

    #login-lottie {
        width: 72px;
        height: 72px;
    }
}
