body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #f4f6fb;
}

.login {
    min-height: 0;
    padding: 1rem;
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrap {
    width: min(100%, 430px);
}

.login-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1090;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #2f96be;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(27, 88, 114, 0.12);
    backdrop-filter: blur(8px);
}

.login-theme-toggle:hover,
.login-theme-toggle:focus {
    color: #278ab1;
    background: #ffffff;
}

.login-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    border: 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 30px 80px rgba(27, 88, 114, 0.18);
    backdrop-filter: blur(10px);
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, #78b9d8 0%, #2f96be 100%);
}

.login-header {
    position: relative;
    z-index: 1;
    padding: 1.35rem 1.25rem 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    color: #1d485b;
    text-align: left;
    background: transparent;
}

.login-badge {
    position: relative;
    overflow: hidden;
    width: 62px;
    height: 62px;
    margin: 0;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #ffffff;
    box-shadow:
        0 16px 28px rgba(47, 150, 190, 0.12),
        inset 0 0 0 1px rgba(120, 185, 216, 0.16);
}

.login-badge::after {
    content: "";
    position: absolute;
    inset: -35% auto -35% -70%;
    width: 45%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
    transform: skewX(-18deg);
    mix-blend-mode: screen;
    pointer-events: none;
    animation: login-badge-sweep 3.8s ease-in-out infinite alternate;
}

@keyframes login-badge-sweep {
    0%,
    42% {
        left: -70%;
        opacity: 0;
    }

    52% {
        opacity: 0.9;
    }

    72%,
    100% {
        left: 125%;
        opacity: 0;
    }
}

.login-badge img {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

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

.login-title {
    margin-top: 4px;
    font-family: "Bahnschrift Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue Condensed", "Nimbus Sans Narrow", sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: 0.01em;
    color: #62b6d6;
    text-transform: uppercase;
    white-space: nowrap;
    transform: scaleX(0.88);
    transform-origin: left center;
}

.login-title-strong {
    color: #1f94bd;
    font-weight: 700;
}

.login-title-light {
    color: #7dc5df;
    font-weight: 300;
}

.login-subtitle {
    margin-top: 0.35rem;
    color: #6e9caf;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.login-body {
    position: relative;
    z-index: 1;
    padding: 0.8rem 1.4rem 1.5rem;
}

.login-body .form-label {
    margin-bottom: 0.45rem;
    color: #2a5f74;
    font-weight: 600;
}

.login-body .form-control,
.login-body .input-group-text {
    min-height: 48px;
    border-color: #c8dfe9;
    background: rgba(247, 252, 255, 0.96);
}

.login-body .form-control {
    border-radius: 16px;
    color: #184355;
}

.login-body .input-group-merge .form-control {
    border-radius: 16px 0 0 16px;
}

.login-body .input-group-text {
    border-radius: 0 16px 16px 0;
    color: #2f96be;
}

.login-body .form-control:focus {
    border-color: #5faecd;
    background: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(47, 150, 190, 0.14);
}

.login-submit {
    width: 200px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    background: linear-gradient(135deg, #78b9d8 0%, #2f96be 100%);
    box-shadow: 0 14px 30px rgba(47, 150, 190, 0.26);
}

.login-submit:hover,
.login-submit:focus {
    background: linear-gradient(135deg, #6fb3d3 0%, #278ab1 100%);
}

.login-footer {
    width: min(100%, 430px);
    margin: 0 auto 1rem;
    padding: 0;
    flex: 0 0 auto;
    color: #5f8fa3;
    font-weight: 600;
    text-align: center;
}

.login-footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    font-family: "Bahnschrift Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue Condensed", "Nimbus Sans Narrow", sans-serif;
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    transform: scaleX(0.9);
    transform-origin: center;
}

.login-footer-logo {
    width: auto;
    height: 18px;
    margin-right: 8px;
    margin-bottom: 3px;
    flex: 0 0 auto;
}

.login-footer-strong {
    color: #1f94bd;
    font-weight: 700;
}

.login-footer-light {
    color: #7dc5df;
    font-weight: 300;
}

.login-toast-container {
    z-index: 1080;
}

html[data-theme="dark"] body {
    background: #1f2833;
}

html[data-theme="dark"] .login-card {
    background: rgba(49, 58, 70, 0.96);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .login-theme-toggle {
    color: #d7e8f5;
    background: rgba(49, 58, 70, 0.92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .login-header {
    color: #e6eef6;
}

html[data-theme="dark"] .login-badge {
    background: #3a4654;
    box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.18),
        inset 0 0 0 1px rgba(120, 185, 216, 0.2);
}

html[data-theme="dark"] .login-badge::after {
    background: linear-gradient(90deg, transparent, rgba(164, 226, 255, 0.62), transparent);
}

html[data-theme="dark"] .login-subtitle {
    color: #9fb3c8;
}

html[data-theme="dark"] .login-body .form-label {
    color: #d6e1ec;
}

html[data-theme="dark"] .login-body .form-control,
html[data-theme="dark"] .login-body .input-group-text {
    border-color: #4a5a6d;
    color: #eef4fa;
    background: #2a333d;
}

html[data-theme="dark"] .login-body .form-control::placeholder {
    color: #8ea3b6;
}

html[data-theme="dark"] .login-body .input-group-text {
    color: #78b9d8;
}

html[data-theme="dark"] .login-body .form-control:focus {
    border-color: #6fb3d3;
    color: #ffffff;
    background: #24303a;
    box-shadow: 0 0 0 0.25rem rgba(47, 150, 190, 0.22);
}

html[data-theme="dark"] .login-footer {
    color: #9fb3c8;
}

@media (max-width: 575.98px) {
    .login {
        padding:
            max(0.75rem, env(safe-area-inset-top))
            0.75rem
            max(1rem, calc(env(safe-area-inset-bottom) + 2.5rem));
    }

    .login-wrap {
        width: 100%;
        max-width: none;
    }

    .login-card {
        border-radius: 20px;
        box-shadow: 0 18px 45px rgba(27, 88, 114, 0.16);
    }

    .login-header {
        padding: 1rem 0.95rem 0.2rem;
        gap: 0.65rem;
        justify-content: flex-start;
    }

    .login-badge {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    .login-badge img {
        width: 34px;
        height: 34px;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .login-subtitle {
        font-size: 0.78rem;
    }

    .login-body {
        padding: 1rem 0.95rem;
    }

    .login-body .form-control,
    .login-body .input-group-text {
        min-height: 46px;
    }

    .login-submit {
        width: 100%;
        min-height: 46px;
    }

    .login-footer {
        width: calc(100% - 1.5rem);
        margin-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }

    .login-theme-toggle {
        top: max(0.75rem, env(safe-area-inset-top));
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 359.98px) {
    .login {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .login-header,
    .login-body {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }

    .login-title {
        font-size: 1.45rem;
    }
}
