@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200..800&display=swap');

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.login-wrapper {
    padding: 38px;
    height: 100vh;
    min-height: 700px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    background: #FFFFFF;
}

.login-page1 {
    flex: 1;
    max-width: 100%;
    position: relative;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    border-radius: 24px;
    overflow: hidden;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.login-card {
    position: absolute;
    top: 10%;
    transform: translateY(-50%);
    right: 8%;
    width: min(420px, 90vw);
    max-height: 85%;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 22px;
    padding: 30px 40px;
    box-sizing: border-box;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: box-shadow 0.3s ease;
}

.login-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12),
    0 1px 5px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.login-card h2 {
    color: #008DCE;
    margin: 0 0 20px;
    font-size: 25px;
    font-weight: 800;
}

.login-card .form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    color: #13202E;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
}

.form-group input,
.form-control {
    width: 100%;
    height: 48px;
    border: 1px solid #ECEDF5;
    outline: none;
    border-radius: 10px;
    padding: 0 16px;
    background: #FFFFFF;
    font-size: 14px;
    box-sizing: border-box;
    font-family: "Plus Jakarta Sans", sans-serif;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-group input:focus,
.form-control:focus {
    border-color: #008DCE;
    box-shadow: 0 0 0 4px rgba(0, 141, 206, 0.15);
    background: #ffffff;
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.forgot_link {
    color: #006DA8 !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    position: relative;
}

.forgot_link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1.5px;
    bottom: -2px;
    left: 0;
    background-color: #008DCE;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.forgot_link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.captcha-row {
    margin: 12px 0;
    min-height: 78px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.signin-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #008DCE 0%, #006DA8 50%, #008DCE 100%);
    background-size: 200% auto;
    color: white;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 141, 206, 0.25);
}

.signin-btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 141, 206, 0.4);
}

.signin-btn:active {
    transform: translateY(0);
}

.login-footer {
    position: absolute;
    bottom: 24px;
    left: 55px;
    right: 55px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #4A6070;
    font-size: 9px;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.login-footer div {
    display: flex;
    gap: 40px;
}

.login-footer a {
    color: #4A6070;
    text-decoration: none;
    font-size: 9px;
    font-weight: 700;
    position: relative;
}

.login-footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1.5px;
    bottom: -2px;
    left: 0;
    background-color: #4A6070;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.login-footer a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.login-footer a:hover {
    color: #1a2a3a;
}

p.error-message {
    color: #ff3b30;
    font-size: 10px;
    font-weight: 500;
    margin: 0;
}

/* Staggered entrance animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.18s; }
.delay-3 { animation-delay: 0.26s; }
.delay-4 { animation-delay: 0.34s; }
.delay-5 { animation-delay: 0.42s; }
.delay-6 { animation-delay: 0.5s; }

@keyframes shake {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateY(-50%) translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateY(-50%) translateX(6px); }
}

.shake-animation {
    animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@media (max-width: 1024px) {
    .login-card {
        right: 50%;
        transform: translate(50%, -50%);
        top: 50%;
    }

    @keyframes shakeMobile {
        0%, 100% { transform: translate(50%, -50%); }
        10%, 30%, 50%, 70%, 90% { transform: translate(calc(50% - 6px), -50%); }
        20%, 40%, 60%, 80% { transform: translate(calc(50% + 6px), -50%); }
    }

    .shake-animation {
        animation: shakeMobile 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        padding: 16px;
    }

    .login-card {
        left: 50%;
        width: calc(100% - 48px);
        right: auto;
    }

    .login-footer {
        bottom: 12px;
        left: 24px;
        right: 24px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .login-footer div {
        gap: 20px;
    }
}
