:root{
    --bg-page: #edf1f7;
    --bg-right: #eef2f7;
    --card-bg: #ffffff;
    --text-main: #14264b;
    --text-soft: #71809c;
    --primary: #145dff;
    --primary-2: #2f80ff;
    --danger-bg: #fff1f1;
    --danger-text: #b42318;
    --danger-border: #f3c6c6;
    --info-bg: #eef5ff;
    --info-text: #1d4ed8;
    --info-border: #cfe0ff;
    --shadow-card: 0 26px 70px rgba(10, 23, 53, .08);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

*{
    box-sizing: border-box;
}

html,
body{
    margin: 0;
    min-height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
}

body{
    min-height: 100vh;
}

img{
    max-width: 100%;
    display: block;
}

button,
input{
    font: inherit;
}

a{
    color: inherit;
    text-decoration: none;
}

.login-shell{
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
}

.login-brand-panel{
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: #041a55;
}

.login-brand-image{
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.login-brand-image-fallback{
    background:
        radial-gradient(circle at 22% 34%, rgba(30, 117, 255, .18), transparent 24%),
        radial-gradient(circle at 72% 74%, rgba(19, 89, 255, .18), transparent 28%),
        linear-gradient(155deg, #021b56 0%, #031038 58%, #06112a 100%);
}

.login-brand-overlay{
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.08)),
        linear-gradient(135deg, rgba(3, 17, 61, .14), rgba(3, 17, 61, .06));
    pointer-events: none;
}

.brand-bottom-note{
    position: absolute;
    left: 34px;
    bottom: 28px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(6, 19, 56, .52);
    border: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(6px);
    box-shadow: 0 12px 30px rgba(0,0,0,.16);
    color: #fff;
}

.brand-note-icon{
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 110, 255, .24);
    color: #fff;
    font-size: 1rem;
}

.brand-note-text strong{
    display: block;
    font-size: .94rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.brand-note-text span{
    display: block;
    font-size: .82rem;
    color: rgba(255,255,255,.82);
}

.login-form-panel{
    min-height: 100vh;
    background: var(--bg-right);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px 28px;
}

.login-form-wrap{
    width: 100%;
    max-width: 470px;
}

.login-card{
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 34px 34px 26px;
    border: 1px solid rgba(19, 38, 75, .04);
}

.login-card-logo-wrap{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.login-card-logo-image{
    max-width: 180px;
    max-height: 62px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-card-logo-fallback{
    width: 62px;
    height: 62px;
    margin: 0 auto 10px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(20, 93, 255, .24);
}

.login-copy{
    text-align: center;
    margin-bottom: 24px;
}

.login-copy h1{
    margin: 0 0 8px;
    font-size: 2.2rem;
    line-height: 1.1;
    font-weight: 800;
    color: #102855;
    letter-spacing: -.03em;
}

.login-copy p{
    margin: 0;
    font-size: 1.06rem;
    color: #7a87a0;
    font-weight: 500;
}

.login-alert{
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: .95rem;
    line-height: 1.45;
}

.login-alert i{
    font-size: 1rem;
    margin-top: 1px;
}

.login-alert-error{
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
}

.login-alert-info{
    background: var(--info-bg);
    color: var(--info-text);
    border: 1px solid var(--info-border);
}

.login-form{
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-group{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-group label{
    font-size: .96rem;
    font-weight: 700;
    color: #26385f;
}

.input-shell{
    position: relative;
    display: flex;
    align-items: center;
    height: 58px;
    border: 1px solid #d4dceb;
    border-radius: 16px;
    background: #fff;
    transition: .18s ease;
    overflow: hidden;
}

.input-shell:focus-within{
    border-color: #7dadff;
    box-shadow: 0 0 0 4px rgba(20, 93, 255, .08);
}

.input-icon{
    width: 50px;
    min-width: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9aa7c0;
    font-size: 1.15rem;
}

.input-shell input{
    flex: 1;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0 12px 0 0;
    font-size: 1rem;
    color: #1b2f58;
}

.input-shell input::placeholder{
    color: #a1adbf;
}

.password-toggle{
    width: 50px;
    min-width: 50px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #9aa7c0;
    cursor: pointer;
    transition: .18s ease;
}

.password-toggle:hover{
    color: var(--primary);
}

.login-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.remember-check{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .95rem;
    color: #51617f;
    cursor: pointer;
}

.remember-check input{
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
}

.text-link{
    border: 0;
    background: none;
    padding: 0;
    color: var(--primary);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
}

.text-link:hover{
    text-decoration: underline;
}

.recovery-help{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f4f7fb;
    border: 1px solid #e3eaf4;
    color: #667792;
    font-size: .93rem;
    line-height: 1.45;
}

.recovery-help i{
    color: var(--primary);
    font-size: 1rem;
}

.submit-btn{
    margin-top: 2px;
    height: 58px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(20, 93, 255, .22);
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.submit-btn:hover{
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(20, 93, 255, .28);
}

.submit-btn:disabled{
    opacity: .92;
    cursor: wait;
}

.submit-btn.is-loading{
    pointer-events: none;
}

.spin{
    animation: spin .9s linear infinite;
}

@keyframes spin{
    from{ transform: rotate(0deg); }
    to{ transform: rotate(360deg); }
}

.login-security-note{
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #ebeff5;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7b889f;
    font-size: .95rem;
    font-weight: 500;
}

.login-security-note i{
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: var(--primary);
}

.login-footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    padding: 0 6px;
    color: #7b889f;
    font-size: .92rem;
    flex-wrap: wrap;
}

.footer-left{
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.footer-right strong{
    color: var(--primary);
}

@media (max-width: 1200px){
    .login-shell{
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 991px){
    .login-shell{
        grid-template-columns: 1fr;
    }

    .login-brand-panel{
        min-height: 320px;
    }

    .login-form-panel{
        min-height: auto;
        padding: 28px 20px 34px;
    }

    .brand-bottom-note{
        left: 20px;
        right: 20px;
        bottom: 18px;
    }
}

@media (max-width: 575px){
    .login-form-panel{
        padding: 20px 14px 26px;
    }

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

    .login-copy h1{
        font-size: 1.85rem;
    }

    .login-copy p{
        font-size: 1rem;
    }

    .input-shell,
    .submit-btn{
        height: 54px;
    }

    .login-row{
        align-items: flex-start;
    }

    .login-footer{
        font-size: .86rem;
    }

    .brand-bottom-note{
        padding: 12px 14px;
        gap: 12px;
    }

    .brand-note-text strong{
        font-size: .88rem;
    }

    .brand-note-text span{
        font-size: .78rem;
    }
}

.brand-top{
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-top-logo{
    width: auto;
    height: 42px;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.brand-top-logo-fallback{
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #145dff, #2f80ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(20, 93, 255, .28);
}

.brand-top-text{
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.brand-top-text strong{
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.03em;
}

.brand-top-text span{
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,.88);
}