* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: #0f172a;
    overflow-x: hidden;
}

.login-wrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    background: #eef3f8;
}

.login-bg {
    position: fixed;
    inset: -30px;
    background-image: url("/assets/img/jd1.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(1px);
    transform: scale(1.08);
    animation: bgMove 18s ease-in-out infinite alternate;
    z-index: 0;
}

.login-overlay {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(248, 250, 252, .72), rgba(238, 243, 248, .82)),
        rgba(15, 23, 42, .08);
    z-index: 1;
}

@keyframes bgMove {
    0% {
        transform: scale(1.08) translateX(-22px);
    }

    100% {
        transform: scale(1.08) translateX(22px);
    }
}

.login-card {
    width: calc(100vw - 36px);
    max-width: 360px;
    margin: 48px auto 18px;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
    border-radius: 22px;
    padding: 22px 16px 18px;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow:
        0 24px 60px rgba(15, 23, 42, .18),
        0 2px 8px rgba(15, 23, 42, .05);
}

.brand-area {
    text-align: center;
    margin-bottom: 14px;
}

.login-logo {
    display: block;
    width: 65px !important;
    max-width: 35% !important;
    height: auto !important;
    margin: 0 auto 10px;
}

.login-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 850;
    color: #0f172a;
}

.login-subtitle {
    margin: 5px 0 0;
    font-size: 10.5px;
    line-height: 1.35;
    color: #64748b;
    font-weight: 600;
}

.form-block {
    margin-bottom: 9px;
}

.form-label {
    display: block;
    font-size: 10.8px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 5px;
}

.input-wrap {
    position: relative;
}

.input-wrap > i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
    z-index: 2;
}

.form-control-custom {
    width: 100%;
    height: 39px;
    border: 1px solid #d8e1ed;
    border-radius: 11px;
    padding: 0 12px 0 36px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    outline: none;
}

.form-control-custom::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.form-control-custom:focus {
    background: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, .10);
}

.login-btn {
    width: 100%;
    height: 40px;
    margin-top: 3px;
    border: 0;
    border-radius: 11px;
    background: #1e3a8a;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 850;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 12px 22px rgba(30, 58, 138, .22);
    cursor: pointer;
}

.login-btn:hover {
    background: #172554;
}

.footer-note {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 10px;
    color: #64748b;
    font-weight: 650;
}

.alert-box {
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    display: flex;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
}

.alert-success-custom {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
}

.alert-error-custom {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.field-error {
    margin-top: 6px;
    font-size: 11px;
    color: #be123c;
}

@media (min-width: 768px) {
    .login-wrapper {
        align-items: center;
    }

    .login-card {
        max-width: 390px;
        margin: 0 auto;
        padding: 28px 28px 24px;
    }

    .login-logo {
        width: 190px !important;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .form-control-custom,
    .login-btn {
        height: 45px;
    }

    .form-label {
        font-size: 12.5px;
    }
}

@media (max-width: 390px) {
    .login-card {
        margin-top: 35px;
    }

    .login-logo {
        width: 145px !important;
    }
}