.modal-overlay {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 70px;
    width: 100%;
    height: calc(100% - 70px);
    background-color: rgba(18, 53, 36, 0.6);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    max-height: 85vh;
    overflow-y: auto;
    margin-top: 20px;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(18, 53, 36, 0.10);
    box-shadow: 0 16px 40px rgba(0,0,0,0.28);
    animation: slideDown 0.4s ease-out;
}

.login-header {
    background: linear-gradient(135deg, #123524, #5D8736);
    color: white;
    padding: 16px 18px;
    text-align: left;
    position: relative;
}

.login-header h2 {
    font-size: 18px;
    letter-spacing: 1px;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    color: white;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    transition: 0.2s ease;
    user-select: none;
}

.close-btn:hover {
    background: rgba(255,255,255,0.18);
}

.login-body {
    background: #ffffff;
    padding: 22px 22px 18px;
    text-align: left;
    border-top: 6px solid #809D3C;
}

.login-card .input-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-card .input-group label {
    display: block;
    color: #123524;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 13px;
}

.login-card .input-group input {
    width: 100%;
    padding: 12px 12px;
    border: 1px solid rgba(18, 53, 36, 0.18);
    border-radius: 12px;
    background-color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
}

.login-card .input-group input:focus {
    border-color: #5D8736;
    box-shadow: 0 0 0 4px rgba(93, 135, 54, 0.10);
}

.btn-masuk {
    width: 100%;
    background: linear-gradient(135deg, #123524, #5D8736);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    font-size: 15px;
    transition: 0.2s ease;
}

.btn-masuk:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(18, 53, 36, 0.18);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 16px;
    gap: 10px;
}

.show-password {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #123524;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.show-password input {
    width: 16px;
    height: 16px;
    accent-color: #123524;
}

.reg-text {
    margin-top: 15px;
    font-size: 13px;
    color: #123524;
    text-align: center;
    font-weight: 700;
}

.reg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    margin-left: 6px;
    border-radius: 999px;
    background: rgba(93, 135, 54, 0.16);
    border: 1px solid rgba(93, 135, 54, 0.35);
    color: #123524;
    font-weight: 900;
    text-decoration: none;
    transition: 0.2s ease;
}

.reg-link:hover {
    background: rgba(93, 135, 54, 0.24);
}

.forgot-link {
    font-size: 13px;
    color: #123524;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ========= RESPONSIVE ======== */

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 480px) {
    .modal-overlay {
        top: 60px;
        height: calc(100% - 60px);
        padding: 20px;
        align-items: center;
    }

    .login-card {
        max-width: 340px;
        max-height: 85vh;
        border-radius: 15px;
    }

    .login-header {
        padding: 14px 14px;
    }

    .login-header h2 {
        font-size: 18px;
    }

    .close-btn {
        top: 10px;
        right: 10px;
    }

    .login-body {
        padding: 18px 14px 16px; 
    }

    .input-group {
        margin-bottom: 15px;
    }

    .input-group label {
        font-size: 13px;
    }

    .input-group input {
        padding: 12px; 
        font-size: 14px;
    }

    .btn-masuk {
        padding: 12px;
        font-size: 15px;
        margin-top: 5px;
    }

    .reg-text {
        font-size: 12px;
        line-height: 1.4;
    }
}

@media (max-height: 500px) {
    .modal-overlay {
        align-items: flex-start; 
        padding-top: 20px;
        overflow-y: auto;
    }
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    width: 350px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-header {
    background: linear-gradient(135deg, #123524, #5D8736);
    padding: 20px;
    text-align: center;
    color: white;
}

.login-body {
    padding: 25px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #ccc;
    outline: none;
}

.btn-masuk {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #123524, #5D8736);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-masuk:hover {
    opacity: 0.9;
}

.back-link {
    display: block;
    margin-top: 15px;
    font-size: 13px;
    color: #123524;
    text-decoration: none;
}

.info-text {
    font-size: 12px;
    color: gray;
    margin-top: 10px;
}

